PC Review


Reply
Thread Tools Rate Thread

client-side controls and server-side code

 
 
Jake
Guest
Posts: n/a
 
      17th Aug 2005
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


 
Reply With Quote
 
 
 
 
Lucas Tam
Guest
Posts: n/a
 
      17th Aug 2005
"Jake" <(E-Mail Removed)> wrote in news:(E-Mail Removed):

> 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 ((E-Mail Removed))
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
 
Reply With Quote
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      17th Aug 2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How-to? - Process Client-side AND Server-side Code Blocks With aspnet Button Joey Microsoft ASP .NET 1 3rd Jan 2006 11:01 PM
Confused about Server side/ client side and which controls to use msnews Microsoft ASP .NET 0 27th May 2005 12:01 AM
server side code access the text of <asp:label> changed by client-side javascript code? nick Microsoft ASP .NET 3 15th Dec 2004 06:26 PM
client side vs server side events for controls Mong Microsoft ASP .NET 5 7th May 2004 02:20 PM
Client side code and server controls. =?Utf-8?B?UGF0cmljaw==?= Microsoft ASP .NET 3 21st Jan 2004 03:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:27 PM.