Hi all, if you use ajax modal popup extender and asp validation summary you will notice an issue "Object Expected" javascript error.
Workaround:
Create a class like this
[ToolboxData("")]
Public class AjaxValidationSummary : ValidationSummary
{
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), this.ClientID, ";", true);
}
}
Inherit the above class in aspx pages like
<%@ Register Assembly="TestAssembly" Namespace="TestName" TagPrefix="cc1" %>
Now use cc1 instead of asp
ex: <cc1:AjaxValidationSummary id="" runat="server" />
Workaround:
Create a class like this
[ToolboxData("")]
Public class AjaxValidationSummary : ValidationSummary
{
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), this.ClientID, ";", true);
}
}
Inherit the above class in aspx pages like
<%@ Register Assembly="TestAssembly" Namespace="TestName" TagPrefix="cc1" %>
Now use cc1 instead of asp
ex: <cc1:AjaxValidationSummary id="" runat="server" />
No comments:
Post a Comment