I am using Ajax Toolkit on my content page . I have an Javascript Code which i want to call from the code behind using ScriptManager.RegisterStartupScript.
The javaScript Code is :-
<script type="text/javascript">
function disp_confirm() {
var r = jConfirm("Your Shift End ! Do you still want to Continue ? ")
if (r == true) {
jAlert("You pressed OK!")
}
else {
jAlert("You pressed Cancel!")
}
How to call this disp_confirm()method of javascript from the code behind using C# .
Try this
ScriptManager.RegisterStartupScript(Page,GetType(),"disp_confirm","<script>disp_confirm()</script>",false)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With