---
title: "request in retrieving values from input type textbox"  
description: "request in retrieving values from input type textbox"  
author: "Anonymous User"  
published: 2014-11-27  
updated: 2014-11-27  
canonical: https://www.mindstick.com/forum/12703/request-in-retrieving-values-from-input-type-textbox  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 2 minutes  

---

# request in retrieving values from input type textbox

I having a [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) in retrieving the [values](https://www.mindstick.com/forum/327/sum-textbox-values) [input](https://www.mindstick.com/forum/159209/how-can-i-read-convert-an-input-stream-into-a-string-in-java) at the input type. here is the [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) that we use...

```
protected void Page_Load(object sender, EventArgs e){    if (!Page.IsPostBack)    {       
Session.Remove("clicks");        i = 0;    }}protected void GridView1_SelectedIndexChanged(object sender,EventArgs e){    int rowCount = 0;     rowCount =Convert.ToInt32(Session["clicks"]);     rowCount++;    
Session["clicks"] = rowCount;     Literal1.Text =Literal1.Text + "PRODUCT: <input type='textbox' runat='server'
id='textboxu" + i + "' value='" +
GridView1.SelectedRow.Cells[1].Text + "' ></input> PRICE: <input
type='textbox' runat='server' size='1' id='textboxe" + i + "'
value='" + GridView1.SelectedRow.Cells[2].Text + "'
></input>QUANTITY:<input type='textbox' runat='server' size='1'
id='textboxq" + i + "'></input>TOTAL:<input
type='textbox' runat='server' size='3' id='total" + i + "'
></input><br>";        i++;}protected void Button1_Click(object sender, EventArgs e){    for (int check =0; check <= i; check++)    {        double price =Convert.ToDouble(this.Request.Form["textboxe" + i +
".Value"]);        double quantity = Convert.ToDouble(this.Request.Form["textboxq" + i +
".Value"]);        double total =price * quantity;        TextBox1.Text= Convert.ToString(total);       
//this.Request.Form["total" + i] = Convert.ToString(total);    }}
```

we need to [retrieve](https://www.mindstick.com/forum/34400/how-to-retrieve-form-values-in-controller-action) the answer also from the input type. i hope there are someone who will be willing to help us...

## Replies

### Reply by Pravesh Singh

Hi Jay, \

There is just slight change in syntax to get correct answer, see below snippet

```
 double price =Convert.ToDouble(Request.Form["textboxe" + i ]); double quantity =Convert.ToDouble(Request.Form["textboxq" + i]); double total = price* quantity; TextBox1.Text =Convert.ToString(total); //you need to use only request.Form rather than .value
attribute string szValue =  Request.Form["txt1"]
```

hope it helps


---

Original Source: https://www.mindstick.com/forum/12703/request-in-retrieving-values-from-input-type-textbox

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
