asp.net - Javascript Error after using Script Manager- : The message received from the server could not be parsed -


I am opening a ShowModalDialog on a button OnClientClick event and it is javascript for: -

 < Code> & lt; Script language = "javascript" type = "text / javascript" & gt; Function OpenModal WineLunch () {var variable1 = "noon"; Window.showModalDialog ("ClockPopUP.aspx? Code =" + variable1, "dialogue method: 290px; communicationheet: 270px,"); }   

On the Clock.aspx page, I have an asp button on which I wrote the code: -

  protected void BtnStop_Click (object sender, event aRGS) {_nonProduction = new nonproduction (); If (Session ["Edit Last"]] == Faucet {} and {int NonProdTimeEntryID = Convert.ToInt32 (Session ["Last Nonproductive"]); // Updating TimeSpaceTemplatesAdvertising = _nonProduction.UpdateTimeSpentInDB (NonProdTimeEntryID); If ( IsTimeSpentUpdated == true) {string timespent = convert.ToString (_nonProduction.GetTimeSpent (NonProdTimeEntryID)); // string msg = "consumption in total time" + hidden taskname.Wally.ToString () + ":" + Baruch.ToString ) "Response.End"}; {} " }}  < / Pre> 

Trustworthy Everything is working properly and this code is working as per my requirement I just added a script manager to Clock.aspx because I am displaying a clock that shows the time elapsed by the user. After that, when I'm clicking on btn_Stop on the CLock.aspx page, I get this error message: - "Microsoft JScript Runtime Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server does not parse Could be done. "

Please guide me how I resolve this issue.

I have found out the root cause of this error is happening because the IMM using the rays

guide me how to fix it, because I click the button I want to close the event after I have to.

I used

ScriptManager.RegisterStartupScript (Page, GetType (), "Closed", "window.close ();", is true);

instead of

Response Type ("& lt; script language = 'javascript' & gt; window.close (); & lt; / script & gt;"); reaction. the ending (); And it helps me fix the error.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -