Asp.net Query String
Introduction:
Hi, friends here I would like to share few things about the asp.net query string.
In email sign up or login we might have seen in url, which carries our typed text box value suffix with ? value
this type of transferring value from one page to another page in web application from url is called query string.
Description:
syntax:
in first page,
Respond.Redirect("Default2.aspx?UserId="+txtUserName.Text);
in second page or required page
Introduction:
Hi, friends here I would like to share few things about the asp.net query string.
In email sign up or login we might have seen in url, which carries our typed text box value suffix with ? value
this type of transferring value from one page to another page in web application from url is called query string.
Description:
syntax:
in first page,
Respond.Redirect("Default2.aspx?UserId="+txtUserName.Text);
in second page or required page
String x = Request.QueryString["UserId"];
In the first page we concatenating the username of one text box with giving userid name, and in the second page we assigning that value or getting that value from url and assigning it to the string x.
There are two types of methods in web application, get method and post method.
The get method is to receive the value from the server to client and Post method is to post the value to the server for getting some action to be done.
The query string is like get method.
If you have any question about asp.net or ado.net pls comment, thanks for learning and visit my page.
No comments:
Post a Comment