We have two pages Default1.aspx page for pass the value and Default2.aspx for get the value from query string.
Default1.aspx
- <html lang="en">
- <head id="Head1" runat="server">
- <title>SNJ Diam</title>
- </head>
- <body>
- <form id="form1" runat="server">
- <a href="Default2.aspx?Str=Nikhil">Home</a>
- </form>
- </body>
- </html>
Default2.aspx.cs - protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- if (Request.QueryString["Str"] != null)
- {
- string Str = Request.QueryString["Str"].ToString();
-
- }
- }
- }