<div id="round"> <div id="roundedStat" style="height: auto; width: auto;" runat="server"> <table style="font-weight: bolder; vertical-align: middle; color: #FFFFFF; width: 20%; text-align: center;" cellpadding="0" cellspacing="0"> <tr> <td><img alt="" src="../../images/tl-LightBlue.gif" height="10" width="10" /></td> <td style="background-color: #5BA2EB;"> </td> <td><img alt="" src="../../images/tr-LightBlue.gif" height="10" width="10" /></td> </tr> <tr style="background-color: #5BA2EB;"> <td> </td> <td> <asp:Label ID="lblStatus" Style="display: inline; white-space: nowrap;" runat="server"></asp:Label> <asp:LinkButton ID="UndoDel" runat="server" CausesValidation="False" CommandName="Undelete" OnCommand ="UndoDel_Command" Visible="False">Undo</asp:LinkButton> <asp:PlaceHolder ID="plchStatusControls" runat="server" EnableViewState="False"></asp:PlaceHolder> </td> <td> </td> </tr> <tr> <td><img alt="" src="../../images/bl-LightBlue.gif" height="10" width="10" /></td> <td style="background-color: #5BA2EB; height: 10px;"> </td> <td><img alt="" src="../../images/br-LightBlue.gif" height="10" width="10" /></td> </tr> </table> </div> </div>The above is the PlaceHolder for important messages.
<asp:UpdatePanel ID = "updGrid" runat = "server"> <ContentTemplate> <asp:GridView runat="server" ID="ProfilesGrid" .... </asp:GridView> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="ddlApprovedStatus" EventName="SelectedIndexChanged" /> <asp:AsyncPostBackTrigger ControlID="search_go" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="btnQuery" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="bntSavedApproved" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="ddlApprovedStatus" EventName="SelectedIndexChanged" /> <asp:AsyncPostBackTrigger ControlID="search_go" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="btnQuery" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="bntSavedApproved" EventName="Click" /> </Triggers> </asp:UpdatePanel>Now when I delete a record from the grid I have the following code:
protected void ProfilesGrid_RowDeleted(object sender, GridViewDeletedEventArgs e) { if (e.Exception == null) { this.roundedStat.Style["display"] = "block"; this.lblStatus.Text = "Removed " + e.Values["FirstName"] + " " + e.Values["LastName"] + " click to "; LinkButton UndoDel = (LinkButton)this.plchStatusControls.FindControl("UndoDel") ; if (UndoDel != null) { UndoDel.Visible = true; UndoDel.Text = "Undo"; UndoDel.CommandName = "Undelete"; UndoDel.CausesValidation = false; UndoDel.CommandArgument = e.Keys["RegistrationID"].ToString(); } this.DeletedID = (int)e.Keys["RegistrationID"]; // UndoDel.Command += new CommandEventHandler(UndoDel_Command); // This doesn't really work //this.plchStatusControls.Controls.Add(UndoDel); this.ClientScript.RegisterStartupScript(this.GetType(), "HighlightMess", " Effect.Pulsate('round',1,0.7);", true); } }And it worked before, but now I don't see the Rounded Style at all and when I debug it I see that InnerHTML throws an exception (though it's not shown in IE7)...