Click here to Skip to main content
15,867,750 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
My webform have three textbox.I add the datarow with the data that come from textbox onbuttonclick event.and show the data with gridview but I can add one row.I can add many row by changing textbox value.Help me
Posted
Updated 24-Sep-13 23:31pm
v2
Comments
Madhu Nair 25-Sep-13 5:29am    
Please explain in detail what you are trying to do
Thanks7872 25-Sep-13 5:30am    
Dont repost the question. Follow original thread only.
Nandakishore G N 25-Sep-13 7:10am    
paste the code what you have done till now.

1 solution

The problem you are facing is you are getting only one record when you on button this is happening because i think you have written code for creating the DataTable on the same button click so on every button your datatable regenerated you you will get the last record.

So the solution is put your code creating the datatable inside the condition which is as follow

if(!IsPostBack)
{
//code for creating the datatable.
}

try to maintain the datatable on session on every button click
 
Share this answer
 

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