Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

Set Select Control's Value from Querystring

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
j.t.w - 20 Feb 2008 01:41 GMT
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
Cowboy (Gregory A. Beamer) - 20 Feb 2008 05:11 GMT
If 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.

Signature

Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************

| Think outside the box!

*************************************************
> This is probably very easy.
>
[quoted text clipped - 10 lines]
> Thanks,
> j.t.w
Aidy - 20 Feb 2008 09:14 GMT
Try setting the SelectedValue or SelectedText properties.

> This is probably very easy.
>
[quoted text clipped - 10 lines]
> Thanks,
> j.t.w

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.