I have a asp button in my application, which is working fine in mozilla, chrome, and IE 8 but it is not working in IE 9, I tried a lot but not getting any solution.
Someone please help me in this
<asp:Button CssClass="Button" ID="btnInsert" runat="server" Text="Insert" OnClick="btnInsert_Click" />
When I am checking my button with developer tools (F12) my button is showing like this
<input name="btnInsert" class="Button" id="btnInsert" type="submit" value="Insert"/>
My button Click code
When I am trying to debug it after Button Click then pointer is going to this click but page is not submitting, but that it working fine in other browser..
protected void btnInsert_Click(object sender, EventArgs e)
{
if (Id > 0)
{
this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), string.Format("Page1{0}", this.UniqueID), string.Format("<script language='javascript' type='text/javascript'>Insert('{0}');</script>", Id));
}
else
{
lErrorMessage.Visible = true;
}
}
JavaScript which i am calling on button click
<script language="javascript" type="text/javascript">
function Insert(Id)
{
if (window.opener.InsertText != null)
{
window.opener.InsertText(Id)
window.close();
}
}
</script>
finally I got the answer,
there were some javascript problem on some other page which I was calling at the time of opening InsertText page.
thanks a lot for all of you for your comments and answers.