Reylin Mathew

Reylin Mathew

  • NA
  • 347
  • 75.5k

How to insert all data of gridview

Jan 18 2019 11:25 PM
Records will be displayed in the gridview. Then when we click insert button all the data present in the gridview will be inserted to the database.
in my pblm is some rows are insert to db.. i want all the data insert to db.
bind all the days and dates of month nd yr of gridview ..
but only 12 rows are inserted ..how to solve this pblm.
this is my code..
foreach (GridViewRow row in gvCalender.Rows)
{
Label lblDate = gvCalenderDalaRows[row.RowIndex].FindControl("lblDate") as Label;
string cal_day = gvCalender.DataKeys[row.RowIndex].Values[1].ToString();
mg.AddCalender( lblDate.Text, lblDay.Text);.
}
plx hlp me..thnkx in dv

Answers (2)