Microsoft JScript runtime error: Object expected for onclick="__doPostBack('ctl01$ContentArea1$ctl0
Posted
by xrx215
on Stack Overflow
See other posts from Stack Overflow
or by xrx215
Published on 2010-04-16T15:21:06Z
Indexed on
2010/04/16
15:23 UTC
Read the original article
Hit count: 1439
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.
© Stack Overflow or respective owner