I am using asp.net 3.5. I filled dropdown list in javascript using ajax service but unable to get its selected value in button click event on server side.
Manipulation you make on the client will not be visible on the server. So I suggest you add a hiddenfield, and use some simple javascript to set the hiddenfield value to the value of the selecteditem. You can do that in the onchange event of the DDL.
AbhijitPatil
Member
10 Points
7 Posts
dropdown list filled in javascript using ajax service but unable to get its selected value in but...
Apr 06, 2010 06:31 PM|LINK
I am using asp.net 3.5. I filled dropdown list in javascript using ajax service but unable to get its selected value in button click event on server side.
asp.ne 3.5 C# wizard control next button focus
augustwind
All-Star
35860 Points
4900 Posts
ASPInsiders
Moderator
Re: dropdown list filled in javascript using ajax service but unable to get its selected value in...
Apr 06, 2010 06:47 PM|LINK
What's your code to retrieve the selected Item?
Does the code retrieve anything?
All Things Dot Net
Stored Procs and Code in a Flash!
ASP.Net Sitemap Creator
karan@dotnet
All-Star
26228 Points
4596 Posts
Re: dropdown list filled in javascript using ajax service but unable to get its selected value in...
Apr 06, 2010 06:48 PM|LINK
Does your dropdownlist gets populated with data?
Please post your code
Karan
~ Blog ~
Remember To Mark The Post(s) That Helped You As The ANSWER
MetalAsp.Net
All-Star
112157 Points
18249 Posts
Moderator
Re: dropdown list filled in javascript using ajax service but unable to get its selected value in...
Apr 06, 2010 07:25 PM|LINK
Manipulation you make on the client will not be visible on the server. So I suggest you add a hiddenfield, and use some simple javascript to set the hiddenfield value to the value of the selecteditem. You can do that in the onchange event of the DDL.
There may be better ways, but this should work.