asp.net - Pass a value from the javascript in a user control to a webform -
right now, have user command raises event webform handles handler. typical set delegate, event, , handler working together.
but trying same javascript. user command calls webservice process task, , gets value.
function performsomething(){ //calls webservice ws.callwebservice(valpassed, onsuccess, onfail); } function onsuccess(result){ //result webform handle in script. how can pass webform? } function onfail(){ alert('something bad happened'); }
so 1 time "result" comes webservice, want webform's javacript take there , whatever needs do. give thanks you.
to phone call javascript function code behind should
javascript:
<script type="text/javascript"> function myfunction(result) { alert('this result:' + result); } </script>
c#:
page.clientscript.registerstartupscript(this.gettype(),"callmyfunction","myfunction(result)",true);
javascript asp.net ajax webforms
No comments:
Post a Comment