protected void uxRoleCheckBoxSelector_CheckChanged(object sender, EventArgs e)
{
CheckBox activeCheckBox = (CheckBox)sender;
GridViewRow row = (GridViewRow)activeCheckBox.NamingContainer;
Label myUserName = (Label)row.FindControl("uxUserNameLabelDisplayer");
GridViewRow user = (GridViewRow)myUserName.NamingContainer;
MembershipUser myUser = (MembershipUser)user.DataItem;
if (activeCheckBox.Checked == true)
{
uxMessageDisplayer.Text = "T - Aproved User";
myUser.IsApproved = true;
Membership.UpdateUser(myUser);
}
else
{
uxMessageDisplayer.Text = "F - NOT Aproved User";
myUser.IsApproved = false;
Membership.UpdateUser(myUser);
}
}
this is the format more information visit
http://stackoverflow.com/questions/3939942/asp-net-membershipuser-retrive-data-from-gridview[
^]