Register now or log in to join your professional community.
Dear Muhammad,
To rephrase the question you have asked.( correct me if i am wrong)
have muliple values in gridview( has text box and checkbox) you have to insert all the rows which are selected
here is the small code sample
just place button and on the event
foreach(GridViewRow rw in gv_discpoint.Rows)
{CheckBox chkfill =(CheckBox)rw.FindControl("txtchk");
TextBox txtaction =(TextBox)rw.FindControl("txtAction");
TextBox txttarget =(TextBox)rw.FindControl("txttarget");
if(chkfill.Checked==true)
{
InsertintoSQL( txtaction.Text,txttarget.Text) /// Method to insert value to sql use
}
elseif(chkfill.Checked==false)
{
// do something
}
}
Cheers
Ameen.S