HI Guys,
I populate this select using C# code.
When I submit this form how do I get the selected value on the the new page?
thanks Guys
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit ChoudharyPosted Dec 9, 2009, 12:40 AM
If you give your select object an id:
[HTML]
mohamad aliPosted Dec 8, 2009, 4:47 PM
I thought of this
but for textboxes I did this:
Devicename = Request["txtdevicename"].ToString();
I thought maybe there is a similar way for select ??
Amit ChoudharyPosted Dec 8, 2009, 1:24 AM
There are two ways.. either use session of send the selected value with url...
for session:
Session["selectedvalue"]=ddlgrp.SelectedValue.text;
and retrieve it as:
string value=Session["selectedvalue"].ToString();
or you can send the value in parameter as
Response.Redirect("~/Anypage.aspx?val="ddlgrp.SelectedValue.text);
if it is your answer then please mark it...