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

Abhishek JainRank #1,062 · 1.8K reputationPosted Aug 14, 2013, 12:04 AM EDT
What i have changed in it is EnableViewState="true"..
Abhishek JainRank #1,062 · 1.8K reputationPosted Aug 13, 2013, 5:33 AM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 13, 2013, 7:56 AM EDT
Your code seems to be correct only. Make sure you bind the grid only for the first time
Regards,
Iftikar
prathyusha173 reputationPosted Aug 13, 2013, 11:43 PM EDT
here i'm attaching my file please verify it
please help me
it's important to me