Home > DeveloperSection > Articles > Query String in ASP.NET

Query String in ASP.NET


ASP.Net ASP.Net 
Ratings:
2 Comment(s)
 5428  View(s)
Rate this:

Query String in ASP.NET

Query string is used to pass values from a page to another page. It’s a part of Uniform Resource Locator (URL) which contains the passing values.

Coding for Button Control on Source.aspx page

  protected void Button1_Click(object sender, EventArgs e)

    {

        Response.Redirect("Target.aspx?Textboxvalue="+  TextBox1.Text);

    }

Query String in ASP.NET

Coding on Target.aspx page

protected void Page_Load(object sender, EventArgs e)

{

        Label2 .Text  = Request.QueryString["Textboxvalue"].ToString();

}

Query String in ASP.NET


Query String in ASP.NET

By James Smith on   5 years ago
Hi Sanjay,
Thanks for sharing with us.

URL REDIRECTION

By anil babu on   4 years ago
What is URL REDIRECTION?How can i use this concept in my .net?
my task is i have generated one url like this "http://example.com/"
I am passing one pearameter like "http://example.com/Empno=1"
I want to display Ename in Database table that corresponding "Empno"
plz Help me Give me one simple example

I am new this concepts
plz Help me send source code to my mailID:mandla.anilbabu@gmail.com

Don't want to miss updates? Please click the below button!

Follow MindStick