javascript written in code behind not working when update panel is used
-
String strFilenotFound = "<script language=JavaScript> "; strFilenotFound += " var s=confirm('Do you really want to go to this page??');if(s==true){alert('ya')} else {alert('no')}"; strFilenotFound += "</"; strFilenotFound += "script>"; if (!this.IsStartupScriptRegistered("Startup")) this.RegisterStartupScript("Startup", strFilenotFound); am calling this script on a button click.Am using update panel in this page. if am using the same code in some other page without update panel it's working fine.. please provide a solution... thanks in advance..
-
String strFilenotFound = "<script language=JavaScript> "; strFilenotFound += " var s=confirm('Do you really want to go to this page??');if(s==true){alert('ya')} else {alert('no')}"; strFilenotFound += "</"; strFilenotFound += "script>"; if (!this.IsStartupScriptRegistered("Startup")) this.RegisterStartupScript("Startup", strFilenotFound); am calling this script on a button click.Am using update panel in this page. if am using the same code in some other page without update panel it's working fine.. please provide a solution... thanks in advance..
What have you done to debug it ? See what happens when you try to use AJAX without understanding it at all ? It bites you.
Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
-
What have you done to debug it ? See what happens when you try to use AJAX without understanding it at all ? It bites you.
Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
is there any way to fix this issue.... what is ur suggestion???
-
is there any way to fix this issue.... what is ur suggestion???
-
String strFilenotFound = "<script language=JavaScript> "; strFilenotFound += " var s=confirm('Do you really want to go to this page??');if(s==true){alert('ya')} else {alert('no')}"; strFilenotFound += "</"; strFilenotFound += "script>"; if (!this.IsStartupScriptRegistered("Startup")) this.RegisterStartupScript("Startup", strFilenotFound); am calling this script on a button click.Am using update panel in this page. if am using the same code in some other page without update panel it's working fine.. please provide a solution... thanks in advance..
-
no am not using master page..
-
String strFilenotFound = "<script language=JavaScript> "; strFilenotFound += " var s=confirm('Do you really want to go to this page??');if(s==true){alert('ya')} else {alert('no')}"; strFilenotFound += "</"; strFilenotFound += "script>"; if (!this.IsStartupScriptRegistered("Startup")) this.RegisterStartupScript("Startup", strFilenotFound); am calling this script on a button click.Am using update panel in this page. if am using the same code in some other page without update panel it's working fine.. please provide a solution... thanks in advance..
-
Write these java script code in your page source function load() { Sys.WebForms.PageRequestManager.getInstance().add_endRequest(ShowError); } function ShowError() { } Call load() On body OnLoad Event:- I hope it will work for you
Thnk u.....