this.drpSelRole.Visible = false; this.grdvwUsers.Visible = false; this.tblProInfo.Visible = true;This is from the Save button's code:
this.lblProfStat.Text = "Profile Saved"; this.lblProfStat.Visible = true; this.drpSelRole.Visible = true; this.grdvwUsers.Visible = true; this.tblProInfo.Visible = false;Putting similar code in the Cancel button also works fine.
protected void Page_Init(object sender, EventArgs e) { //this.btnCancelProfile.Attributes["onclick"] = "HideElement('" + this.tblProInfo.ClientID + "');" ; this.btnCancelProfile.Attributes["onclick"] = "ToggleDisplay('true','GridInfo','" + this.drpSelRole.ClientID + "','" + this.grdvwUsers.ClientID + "');ToggleDisplay('false','ProfileInfo');return false;"; this.btnAddToRole.Attributes["onclick"] = "return CheckSelected('" + this.lsbUsers.ClientID + "','Please select Users') && CheckSelected('" + this.LsbRoles.ClientID + "','Please select Roles');";Unfortunately, only "hiding" part works for this button and the grid and combobox never re-displayed.