Wednesday, March 21, 2012

Passing variables, please please help :)

I wrote a much more complicated version of this question earlier and no one answered so i thought i'd simplify it. I want to have a text box and a submit button on page1.aspx. I want a user to type something into the textbox and when they click on the submit button to get passed to page2.aspx?keyword=[value of textbox]. I have tried about five million different ways, html forms don't seem to work because i'm using a master page and i can't get anything else to do it. Please please please could someone help me before i lose all sense of reality :)

Thanks,

Dave

Protected Sub button_click(...) Response.Redirect("page2.aspx?text=" & textbox1.text)End Sub

I cannot begin to express my thanks for that, it is unbelivable, but i have been trying to get it to do that for hours and have been on about 8 forums chatting with people all over the place and tried pages of code. It seemed strange it wasn't possible to do it very simply with hardly any code and you have just shown me how. You may actually be solely responsible for preventing me from losing my sanity and for that i am truely grateful. If i can ever do anything in return then please don't hesitate to ask, although given i couldn't even work that out i wouldn't be too sure you'll get anything useful in response! :)

Once again thank you so, so much, you are an absolute and complete life saver.

Dave

0 comments:

Post a Comment