Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Actually in my project i am using asp.net gridview . through that i am inserting data through textbox which is in item template but i am loosing the data while inserting. in for loop it is not sending the textbox value. instead of that it is sending empty value.

here for that gridview i am binding 50 textbox to insert is there any problem for that many textboxes.
Posted
Comments
Sanjay K. Gupta 28-Jun-14 2:33am    
I am sure, you are rebinding the grid on every postback. Can you post your codes.
ntitish 5-Aug-14 2:07am    
sorry for the late reply. Yes i am rebinding because i should show updated data every time. is there any problem if i rebind the grid.
ntitish 5-Aug-14 2:13am    
sir, if u want to see my code i can send to your mail. so can u please send ur mailid.
DamithSL 28-Jun-14 2:40am    
you need to ask question with related code samples, otherwise you will not receive any direct answer.

There should be no issue binding as many textboxes as required.
Make sure you are binding the right textboxes.
 
Share this answer
 
Loop through the Rows of GridView. Then use row.FindControl("txtYourTextBox"); to get the TextBox.

Refer - Accessing the different controls inside a GridView control[^].
 
Share this answer
 
Check Postback property first, I think because you writing your code there only
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900