Hi, Could you please let me know how to pass value from one page to other through Query String as I am new in ASP.NET. Your help will be appreciated! Thanks, John
If you want to pass value from one page to another using Query string then just add name of query followed by its value. example supose you have two pages a.aspx and b.aspx and you want to pass value from a.aspx to b.aspx then instead of just redirecting to page b.aspx, redirect to b.aspx as b.aspx?Name=Haider Here Name is name of Query String and Haider is value you want to pass. Now to access this value in b.aspx use string strName = Request.QueryString["Name"].toString();
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
example
supose you have two pages a.aspx and b.aspx and you want to pass value from a.aspx to b.aspx then instead of just redirecting to page b.aspx, redirect to b.aspx as b.aspx?Name=Haider
Here Name is name of Query String and Haider is value you want to pass.
Now to access this value in b.aspx use
string strName = Request.QueryString["Name"].toString();