Microsoft JScript runtime error: Object expected for onclick="__doPostBack('ctl01$ContentArea1$ctl0
- by xrx215
in ascx page i have added a cutom button as follows
xrx:CustomButton id="CustomButton4" runat="server" OnClientClick="Login" Text="Login" /
in ascx.cs i have
protected void Page_Load(object sender, EventArgs e)
{
CustomButton4.OnClientClick = Page.ClientScript.GetPostBackEventReference(this.CustomButton4, string.Empty);
this.lblAppName.Text = this.AppName;
lblsession.Text = this.GetString("SDE_SESSION_EXPIRED_PLEASE1");
}
protected void Login(object sender, EventArgs e)
{
Xerox.FMP.Providers.FormsAuthentication formsAuthHelper = new Xerox.FMP.Providers.FormsAuthentication();
formsAuthHelper.SignOut();
Response.Redirect("~/LoginPage.aspx", true);
}
when i click on login button the page is not redirecting to loginpage.aspx instead it is throwing an error object expected.
Can you please help me with this issue.