Hello,
I have a multiple select list in a form. I want to get the items in that list. I have tried to get it like I get input text for example, with Request.Form("blabla"). But Request.Form("MultipleSelectList"), Gives me nothing.
How do I get the items in the multiple select list in the form? I guess it is pretty simple.
Thank you!
Request.Form -- Multiple Select -- How?
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Bechir BejaouiRank #144 · 15.9K reputationPosted Dec 21, 2008, 6:24 AM EST
try this foreach ( string var in Request.Form["listname"] ) { Response.Write ( Request.Form[ var ] ); }Or5 reputationPosted Dec 21, 2008, 9:07 AM EST
I tried to change the string to char and then I got: "Object reference not set to an instance of an object".
I think it tries to loop through the chars in the string that returned from the Request.Form...
Any idea?
Bechir BejaouiRank #144 · 15.9K reputationPosted Dec 21, 2008, 12:10 PM EST
System.Convert.ToString(charvalue);
System.Convert.ToChar(stringvalue);
Or5 reputationPosted Dec 22, 2008, 4:50 AM EST
Please, someone knows how to do that?
thx