JScript runtime error on insert, ASP.NET
<p>I have a website built in asp.net c#. I applied some error handling to a page that has a datagrid view and allows users to create new records within the webpage. the error handling checks if the user's input is null, if so, it javascript popup box appears stating there is a null value. it works but now I'm getting a strange jscript runtime error. </p>

<p>sql query code within aspx page (referencing OnInserted="Page_On_Inserted"):</p>

<pre><code>&lt;asp:SqlDataSource ID="TEST_PageEdit" runat="server" OnSelected="TEST_PageEdit_Selected" ConnectionString="&lt;%$ ConnectionStrings:TESTConnectionString %&gt;" DeleteCommand="DELETE FROM TEST_Page WHERE (Page_PK = @Page_PK)" InsertCommand="INSERT INTO TEST_Page(Link_Cat_FK, Url_FK, PageText, Score) VALUES (@Link_Cat_FK, @Url_FK, @PageText, @Score)" SelectCommand="SELECT Page_PK, Link_Cat_FK, Url_FK, PageText, Score FROM TEST_Page WHERE (Link_Cat_FK = @Link_Cat_FK) AND (Url_FK = @Url_FK)" UpdateCommand="UPDATE TEST_Page SET PageText = @PageText, Score = @Score WHERE (Page_PK = @Page_PK)" OnInserted="Page_On_Inserted"&gt;
</code></pre>

<p>code behind for Page_On_Inserted:</p>

<pre><code> protected void Page_On_Inserted(object sender, SqlDataSourceStatusEventArgs e)
    {
        if (e.Exception == null)
        {
        }
        else
        {
            e.Command.Cancel();
            e.ExceptionHandled = true;
            Response.Write("&lt;script&gt;alert('No content was applied to the page')&lt;/script&gt;");
        }

    }
</code></pre>

<p>JScript error and line of code:</p>

<pre><code>Microsoft JScript runtime error: Sys.InvalidOperationException: For the history feature to work in IE, the page must have an iFrame element with id '__historyFrame' pointed to a page that gets its title from the 'title' query string parameter and calls Sys.Application._onIFrameLoad() on the parent window. This can be done by setting EnableHistory to true on ScriptManager.

if (!this.historyFrame) throw Error.invalidOperation(Sys.Res.historyMissingFrame);
</code></pre>
