473,695 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Set Select Control's Value from Querystring

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.QuerySt ring("cus")
StartDate.Text = Request.QuerySt ring("Sdate")

This works...
StartDate.Text = Request.QuerySt ring("cus")

Thanks,
j.t.w
Feb 20 '08 #1
2 2147
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 .

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

*************** *************** *************** ****
| Think outside the box!
|
*************** *************** *************** ****
"j.t.w" <j.***@juno.com wrote in message
news:a9******** *************** ***********@q78 g2000hsh.google groups.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.QuerySt ring("cus")
StartDate.Text = Request.QuerySt ring("Sdate")

This works...
StartDate.Text = Request.QuerySt ring("cus")

Thanks,
j.t.w

Feb 20 '08 #2
Try setting the SelectedValue or SelectedText properties.

"j.t.w" <j.***@juno.com wrote in message
news:a9******** *************** ***********@q78 g2000hsh.google groups.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.QuerySt ring("cus")
StartDate.Text = Request.QuerySt ring("Sdate")

This works...
StartDate.Text = Request.QuerySt ring("cus")

Thanks,
j.t.w

Feb 20 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2333
by: Matthew Louden | last post by:
I am using VBScript for ASP. The control value must be case sensitive? The following example should print the "fname" value, but if if I change "submit" back to "SUBMIT". Then it works fine. <% If (Request.QueryString("submit") = "submit") Then Response.Write(Request.QueryString("fname")) End if %>
6
1338
by: Jack | last post by:
Hello, <%@ Language=VBScript %> <% Response.Write "<FORM name=form1>" Response.Write "<select name=""select1"">" Response.Write "<option value=1>One</option>" Response.Write "<option value=2>Two</option>" Response.Write "<option value=3>Three</option>" Response.Write "</select>" Response.Write "</FORM>"
2
1535
by: Johan Christensson | last post by:
Hi. I'm woundering if it's possibel to transfer a OnAction value from a drop-down box in an ASP page without having to use Java code? I mean something like this: <% Sub resposeprocess
3
10833
by: Joe Bloggs | last post by:
Does anyone know if its possible to pass parameters or the values of Request.QueryString from a web page to a custom control class? I'm using a C# Web Application. For Example I have Web Page1 which has to parameters passed to it from another Web page Parameter # 1 dbid and Parameter # 2 reportid. I know that I can access the values of the parameters from the code behind .aspx.cs using Request.QueryString so
5
2779
by: footballhead | last post by:
I have a site that has MANY different clothing categories. I have a page set up for displaying the products (productsearch.aspx) when a user clicks one of the category links on the navigation menu. I would like to have a different user control that gets loaded as a sub-header for each category (ie, tee shirts, shoes, backpacks, etc.) The category user controls include images and links to refined searches specific to each category. So...
3
3393
by: mark.irwin | last post by:
Hello all, Have an issue where a redirect pushes data to a page with a select case which then redirects to another page. Problem is the redirect isnt working in 1 case. Code below: strURL = "" if i = 1 then strURL = "redirect.aspx?page=APIQ&parcel=" & strParcel &
8
2263
by: David Lozzi | last post by:
Howdy, I have a user control that is a report to display data. On the page the control is inserted in, I have filter options to filter the report. When I try to do something like this, nothing happens. dim filt as string ... build filter string... UserControl.ReportFilter = filt
4
1619
by: Jeff | last post by:
Hey gang. I have a form to select multiple names. The problem I am having, is when it gets to the asp page. If I click 1 name, it will process. But multiple names gives me an error: Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. /GIG/ladder/reportasp2_new.asp, line 53 that line's code is set rsID2 = conn.execute ("select total_score from rounds where username =
3
3050
by: mso5 | last post by:
Hi, I am trying to build a small form with a list of countries and regions by each country (yes, the classical one), and I'm stuck with it. I'm using AJAX also, and I manage to get the correct value from the selection, but it does not modify the second list based on the first selection. Can anyone tell me what am I doing wrong in this code? I am not a programmer.. Thank you! <script language="javascript" type="text/javascript"> <!--
0
8647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8585
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9004
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8864
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5842
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4592
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3024
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2288
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1986
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.