Showing posts with label redirect. Show all posts
Showing posts with label redirect. Show all posts

Monday, March 26, 2012

Pass values in QueryString using VB.Net

Response.Redirect("http://localhost/WebApplication3/Forms/paymentprocessing.aspx?fname=+"

'Me.txtFirstName.Text"'", False)

how do i pass the text from a control in the querey string???

Dim myURL as string = "http://Localhost/WebApplication3/Forms/paymentprocessing.aspx?fname="

myURL = myURL & Me.txtFirstName.Text

Response.Redirect(myURL, False)

Wednesday, March 21, 2012

Passing a Querry string in a Response.Redirect?

I want to be able to redirect on a Button click event with a querry string attached with the username, is this possible?
would it look something like?
'Response.Redirect("link.aspx?UserId="Label.Text"") or
'Response.Redirect("link.aspx?userid=("Label.Text"))

This should do it:
Response.Redirect( "link.aspx?UserId=" & Server.UrlEncode(myLabel.Text) )

passing a querystring

hey all,
i know i can do response.redirect("my.aspx?id=1")

but what if i'm doing a postback, is there something similar to querystring?

thanks,
rodcharHello,

Request.QueryString allows to read querystring parameters during a postback.
Is this what you are looking for ?

--
Patrice

"rodchar" <rodchar@.discussions.microsoft.coma crit dans le message de
news: 2ACC9430-3838-4BA9-A359-1F352434FF08@.microsoft.com...

Quote:

Originally Posted by

hey all,
i know i can do response.redirect("my.aspx?id=1")
>
but what if i'm doing a postback, is there something similar to
querystring?
>
thanks,
rodchar


Use the viewstate collection or add a HiddenField.