Request.Form("ListBox1.ClientID")
returning nothing in webcontentform and usercontrols. But it works perfectly fine with normal webform.
All the dropdownslist and Listbox are populated by jquery. So the server is not able to retrieve the selected values because they really don’t exist in the first place according to server, but they do exist on the client side. Then I use Request.Form it works perfectly fine with normal Webform, but it return’s nothing while i use it in webcontentpages or usercontrols.
I’m really suck with this problem any ideas will be helpful.
If you are populating items outside of the ViewState, as you said the server won’t know about them due to that. You can take a look at this question for more insight:
Client-side JavaScript ViewState Update in asp .net forms
I have used a hidden elements section in my projects with TextBoxes to store the selected values and Buttons that pass the data back to the server via a
__doPostBack();or$button.click();call.