OnClick="senddetails_Click1" />
protected void senddetails_Click1(object sender, ImageClickEventArgs e)
{
string str = string.Empty;
string strname = string.Empty;
foreach (GridViewRow gvrow in gvcategory.Rows)
{
CheckBox chk = (CheckBox)gvrow.FindControl("Checkdata");
if (chk != null & chk.Checked)
{
str += gvcategory.DataKeys[gvrow.RowIndex].Value.ToString() + ',';
strname += gvrow.Cells[2].Text + ',';
}
}
str = str.Trim(",".ToCharArray());
strname = strname.Trim(",".ToCharArray());
}
i'm selecting one checkbox and click on button
then it does'nt goes to foreachloop why?
please help me
it's important to me
4 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Abhishek JainPosted Aug 14, 2013, 4:04 AM
What i have changed in it is EnableViewState="true"..
prathyushaPosted Aug 14, 2013, 3:43 AM
here i'm attaching my file please verify it
please help me
it's important to me
Iftikar HussainPosted Aug 13, 2013, 11:56 AM
Your code seems to be correct only. Make sure you bind the grid only for the first time
Regards,
Iftikar
Abhishek JainPosted Aug 13, 2013, 9:33 AM