469,641 Members | 1,116 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,641 developers. It's quick & easy.

client-side controls and server-side code

To avoid a postback, we want to use a webservice and XMLHTTP to fetch the
list of values for dropdowns whose contents are determined by an earlier
user-choice on the page. E.g. if the user selects "FL" from the State
dropdown, the Cities dropdown will be populated with cities in Florida only:

State Dropdown Cities Dropdown
NY Miami
PA Tampa
FL St Augustine
If the Cities dropdown is a client-side SELECT object populated in this
manner (i.e. client-side DOM parsing of XML dataset returned by a
webservice), is it possible, in code-behind, to detect which City was
selected when the form is posted?

Thanks
Jake
Nov 19 '05 #1
2 1012
"Jake" <Ja**@my.biz> wrote in news:OZ**************@tk2msftngp13.phx.gbl:
is it possible, in code-behind, to detect which City was
selected when the form is posted?


Yes you can use the class "Request.form" to read the control value.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #2
You may need to use client side script to write the value to a hidden field.
Then you could read the hidden field from the Request.Form collection.

I recently discovered this suite of controls that makes this kind of thing
easier than I would have imagined it could be:
http://www.dart.com/powerweb/livecontrols.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Jake" <Ja**@my.biz> wrote in message
news:OZ**************@tk2msftngp13.phx.gbl...
To avoid a postback, we want to use a webservice and XMLHTTP to fetch the
list of values for dropdowns whose contents are determined by an earlier
user-choice on the page. E.g. if the user selects "FL" from the State
dropdown, the Cities dropdown will be populated with cities in Florida
only:

State Dropdown Cities Dropdown
NY Miami
PA Tampa
FL St Augustine
If the Cities dropdown is a client-side SELECT object populated in this
manner (i.e. client-side DOM parsing of XML dataset returned by a
webservice), is it possible, in code-behind, to detect which City was
selected when the form is posted?

Thanks
Jake

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Justin Stockton | last post: by
4 posts views Thread by Mike D | last post: by
2 posts views Thread by Rhino | last post: by
11 posts views Thread by pshindle | last post: by
2 posts views Thread by J Huntley Palmer | last post: by
11 posts views Thread by Bill Davy | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.