Reputation: 51
I have website in asp.net 4.0, where i used,
litAlert.Text = "<script language=javascript>alert('Some Error(s) occured while processing your request. Click Ok to view the Error Details.');__doPostBack('btnTemp','')</script>";
But when i am trying to debug, it will not call btnTemp onclick event.
Please give me solution regarding this issue.
Upvotes: 0
Views: 567
Reputation: 1027
You could at this to Page_PreRender
protected void Page_PreRender(object sender, EventArgs e)
{
this.Page.ClientScript.GetPostBackEventReference(litAlert, string.Empty);
}
Upvotes: 1