Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Drop Down Cookie

Status
Not open for further replies.

dodge20

MIS
Jan 15, 2003
1,048
US
I have a dropdown that is populated from a database recordset. I want to create a remember me checkbox which will remember their selection if they check the box.

Any ideas?

Thanks

Dodge20
 
Not quite following what you need, but if you are needing to pull info from your database you would somthing like this:

set rs = Server.CreateObject ("ADODB.Recordset")
Set conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "Provider=SQLNCLI;Server=SERVER\SQLEXPRESS;Database=Data;Trusted_Connection=yes;"
Conn.Open

sql = "SELECT * FROM [MyData] WHERE [MyData].[CustomerID]=" & Request.QueryString("CustomerID")
rs.open sql, conn, 3, 3

session("check_box")=rs("CheckBox")

rs.Close
Conn.Close
Response.Redirect "/myfolder/myform.asp"
Response.End


<%=session("check_box"))%> <-- Then Put that in initial value of the check box.
 
It sounds like you need to set a client-side cookie, which would probably be using client-side Javascript, not ASP.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top