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.
Printable View
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.
Do an event handler for its onClick event and post the selected items as a querystring
Can you give some example code please? The only way I know how is
VB Code:
response.write "<a href='myasp.asp?dir=d:/'>link</a>"
I don't know what to put in the click event
VB Code:
private sub ListBox1_onclick() ??????? end sub
Thx
visual basic code:--------------------------------------------------------------------------------
private sub ListBox1_onclick()
Response.Redirect ("SomePage.aspx?id=" & ListBox1.SelectedIndex)
end sub
--------------------------------------------------------------------------------
OK, That is nice and easy.
Thanks.