I’m trying the code sample (for ASP NET C#, for VS2010) from this page:
http://msdn.microsoft.com/en-us/library/bz9tc508.aspx
And for anything I do the following line always evaluated to null:
if (Request.Form["ListBox1"] != null)
{
}
Can someone explain why?
You are getting
nullbecause you are trying this example in a page that has a master page. If your page has a master page, controls rendered in the client side have a different ID. Since theRequest.Formrequires theclient Idto access the value.