Showing posts with label items. Show all posts
Showing posts with label items. Show all posts

Wednesday, March 28, 2012

ViewState and JavaScript

Hi guys,

I have two list boxes that I use for dual list box functionality, and there are four buttons that allow movement of the items from one box to another. All this is performed using javascript functions attached to buttons those 4 buttons. There is one more button that is supposed to get values from the right box and print reports. All controls are in update panel. In Pre-Reneder method I am checking to see if there are any items in the right box, and there aren't ever any. Is there something that I need to do so state of the controls would be maintained?

Are you adding the Right side listbox items in client side by JS/DHTML? If so the viewstate will not sync with the server.


Yes I am using javascript/dhtml. So is there other way to do it on client side that will sync up with server?


Hi

I'm afraid there is no way to do this.Please change it to using AJAX to do that at server side.

Good luck.


Hi,

Please refer to this article[ http://aspalliance.com/1071_Smart_ListControl_in_ASPNET_1x20 ], it explains the reason and gives a solution.

Hope this helps.

Saturday, March 24, 2012

Watermark for Dropdown List.

is there a watermark capability for dropdown list?

using the textboxwatermarkextender does not work quite well with a dropdown.

by adding items into the dropdown, this will disable the watermark. and watermark text do not show up in the dropdown text area.

Have a look at using TextBoxWatermark's set_Text method as outlined here in an old sample:http://blogs.msdn.com/delay/archive/2006/08/15/701848.aspx

Wednesday, March 21, 2012

web method error in cascadingDropdown

i am trying to use the cascading dropdownlist control, using a web service to get items from a database. the web method works fine, but i get a web method error 404 or 500. any help in solving this would be greatly appreciated.

Hi, mnyats.

I solved right now (telling the true, in this exact minute) a problem I was facing that was generating this same error message. In my case the problem was:

1 - I was trying to make cascadingDropDown to work with no service; (I guess it's possible but all the samples I got on the web says no)

2 - On the call of my service, inside my aspx page, I forgot to include the full namespace of the service;

3 - The service was with the attribute: <System.Web.Script.Services.ScriptService()> commented.

I don't know which problem are you having now, but I hope this can help...

See you!@.!

<mnyats> escreveu na mensagemnews:1966118@.forums.asp.net...

i am trying to use the cascading dropdownlist control, using a web service to get items from a database. the web method works fine, but i get a web method error 404 or 500. any help in solving this would be greatly appreciated.

http://forums.asp.net/p/1172554/1966118.aspx#1966118


Hi,

I think Fiddler is a good choice for you to trouble shooting. Please refer to this thread: http://forums.asp.net/t/1172379.aspx