---
title: "Query String in ASP.NET"  
description: "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.  Cod"  
author: "Sanjay Singh"  
published: 2011-04-02  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/512/query-string-in-asp-dot-net  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# 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](https://www.mindstick.com/mindstickarticle/b054bcbc-bf0f-4b36-9896-bef7f08e5c50/images/19db448e-1eb5-430d-baf6-9d43ead36086.png)

**Coding on Target.aspx page**

```
 protected void Page_Load(object sender, EventArgs e) {         Label2 .Text  = Request.QueryString["Textboxvalue"].ToString();}
```

\

![Query String in ASP.NET](https://www.mindstick.com/mindstickarticle/b054bcbc-bf0f-4b36-9896-bef7f08e5c50/images/bd6aed75-38e5-424f-9c36-a1d5e1c22147.png)

---

Original Source: https://www.mindstick.com/articles/512/query-string-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
