>protected void grdvwUsers_RowDataBound(object sender, GridViewRowEventArgs e) > { > if (e.Row.RowType == DataControlRowType.DataRow) > { > > LinkButton link = e.Row.FindControl("lnkbtnRemoveRole") as LinkButton; > > if (link != null) > { > > link.ToolTip = "Remove " + > e.Row.DataItem.ToString() + " from the " + > this.drpSelRole.SelectedValue + " role"; > > link.Attributes["onclick"] = > "HideElement('" + this.lblProfStat.ClientID + > "');return confirm('Do you want to remove " + > e.Row.DataItem.ToString() + " from role " + > this.drpSelRole.SelectedValue + "?' );"; > link.CommandArgument = e.Row.DataItem.ToString(); > } > } > } > > #region Buttons_in_grid > protected void lnkbtnRemoveRole_Click(object sender, EventArgs e) > { > //int index = this.grdvwUsers.SelectedIndex; > this.lblMsg.Text = ""; > this.lblProfStat.Visible = false; > > LinkButton link = (LinkButton)sender; > string username = link.CommandArgument;>