hyperlink with querystring based on value in textbox

S

Stephen Witter

I have a hyperlink and I want the navigateURL to point to another web
form while passing a value of a textbox as a querystring:

<asp:hyperlink navigateURL="MyPage.aspx?ID=<%# MyTexBox.text %> etc..

I can't seem to figure out how to do this

Then in the other form it doesn't seem to like either of these

dim intID as integer=request.querystring("ID")

or

dim intID as integer=request.querystring["ID"]

I am fairly new to asp.net and woudl appreciate the help.
 
S

Stephen Witter

I resorted to the follwing in the page load event:

HyperLink1.NavigateUrl ="MyPage.aspx?ID=" & txtMyTextbox.text

although I think there is a better event to put this into due to the
fact that I have to submit the page twice to get it to work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top