Click here to Skip to main content
15,920,053 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Gridview as follows


Student id student name
1 sam
2 suresh
3 rajesh


i want to save the above gridview record in database.

for that how can i do in asp.net using c#.

regards,
narasiman P.
Posted

Take a button and on click of that Wright:

foreach (GridViewRow row in GridView.Rows)
{
Label label1= (Label )row.FindControl("Label1 ");
Label label2= (Label )row.FindControl("Label2 ");


Write Sql command for insertion here
}
 
Share this answer
 
 
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