Hi,
Here I will sow you how small data can be retrieved using the query string. A query string is the part of a URL that contains data to be passed to web applications.
First of all, you have to have a textbox named 'txtTest' and the text to be retrieved on the other page, into it. Then create a linkbutton in the page saying "Click here" or something like that. Give this code for the linkbutton click event:
Dim redirectURL As String = "~/StringRetrieve.aspx" If (txtTest.Text <> "") Then redirectURL += "?string=" + txtTest.Text End If Response.Redirect(redirectURL)
Then in the page StringRetrieve.aspx, create a textbox named 'txtString' and give this code in the page load:
If Not Request.QueryString("string") Is Nothing Then Me.txtString.Text = Request.QueryString("string").ToString() End If
Thats it...done..
Regards, Pradeep Y
|
No responses found. Be the first to respond and make money from revenue sharing program.
|