Its very strange behavior that I’m facing. I have delete button, OnClick I’m attaching it to that particular event. I’m storing my entire data in Session so, in if(!IsPostBack) i am clearing out the session when the page Initially loads. When i click on the delete button instead of doing IsPostBack = true it does IsPostBack = false in IE and resets the Session data. But, with other browser i do get the expected functionality.
Does any one have any clue about this issue ?
Button tag aspx file,
<tr id="rowPurpose">
<td>
<asp:Label ID="lblPurpose1" Font-Bold="true" runat="server">Purpose</asp:Label>
</td>
<td width="65">
<asp:Button ID="btnDeletePurpose1" Text="Delete" Visible="false" CommandArgument="lblPurpose1" OnClick="Delete_Purpose" runat="server" />
</td>
</tr>
C# file:
void page_load()
{
rowPurpose.Attributes["onclick"] = "javascript:Method('id')";
if (!Page.IsPostBack)
{
Session["Key"] = null;
}
}
Thanks in advance!
I got this resolved. From my understanding it was happening because of the two events that are firing at the same time one for the Row and other for the Button click. So i just made cell as clickable instead of whole row and this works fine.
Thanks