Click to See Complete Forum and Search --> : querystrings and autopostback
Sneeden
Sep 23rd, 2002, 02:32 AM
How do I have a contol postback and include a querystring?
I have a listbox and when the user clicks a selection, I want to pass listbox.selecteditem.text as a querystring.
Thanks for any info.
SoftwareMaker
Sep 23rd, 2002, 04:40 AM
Do an event handler for its onClick event and post the selected items as a querystring
Sneeden
Sep 23rd, 2002, 04:16 PM
Can you give some example code please? The only way I know how is
response.write "<a href='myasp.asp?dir=d:/'>link</a>"
I don't know what to put in the click event
private sub ListBox1_onclick()
???????
end sub
Thx
SoftwareMaker
Sep 23rd, 2002, 05:48 PM
visual basic code:--------------------------------------------------------------------------------
private sub ListBox1_onclick()
Response.Redirect ("SomePage.aspx?id=" & ListBox1.SelectedIndex)
end sub
--------------------------------------------------------------------------------
Sneeden
Sep 23rd, 2002, 05:49 PM
OK, That is nice and easy.
Thanks.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.