This is probably very easy.
How do I set an HTML select control's value from the querystring?
This is what I have...but, only the select control's value doesn't get
set.
CustomerSelect.Value = Request.QueryString("cus")
StartDate.Text = Request.QueryString("Sdate")
This works...
StartDate.Text = Request.QueryString("cus")
Thanks,
j.t.wIf you just want a dropdown, consider the server controls rather than HTML
controls and then set selected value to the key value you wish. I can look
at the HTML control and probably guide there, but the server controls are
fairly straightforward.
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
****************************************
*********
| Think outside the box!
|
****************************************
*********
"j.t.w" <j.t.w@.juno.com> wrote in message
news:a9a2e312-6182-45b3-83b5-5298b955a785@.q78g2000hsh.googlegroups.com...
> This is probably very easy.
> How do I set an HTML select control's value from the querystring?
> This is what I have...but, only the select control's value doesn't get
> set.
> CustomerSelect.Value = Request.QueryString("cus")
> StartDate.Text = Request.QueryString("Sdate")
> This works...
> StartDate.Text = Request.QueryString("cus")
> Thanks,
> j.t.w
Try setting the SelectedValue or SelectedText properties.
"j.t.w" <j.t.w@.juno.com> wrote in message
news:a9a2e312-6182-45b3-83b5-5298b955a785@.q78g2000hsh.googlegroups.com...
> This is probably very easy.
> How do I set an HTML select control's value from the querystring?
> This is what I have...but, only the select control's value doesn't get
> set.
> CustomerSelect.Value = Request.QueryString("cus")
> StartDate.Text = Request.QueryString("Sdate")
> This works...
> StartDate.Text = Request.QueryString("cus")
> Thanks,
> j.t.w
>
Tuesday, March 13, 2012
Set Select Control's Value from Querystring
Labels:
asp,
control,
html,
net,
querystring,
querystringthis,
select,
value
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment