This is a migrated thread and some comments may be shown as answers.

Call server-side method from Javascript?

1 Answer 293 Views
Getting started with ASP.NET
This is a migrated thread and some comments may be shown as answers.
Axe
Top achievements
Rank 1
Axe asked on 28 Apr 2007, 09:11 AM
Can I call a server-side method from Javascript?

What I have is a page that plays a flash video and I have actionscript that call a javascript method. In the javascript method I would like to call a server side method.

Currently I have a hidden button who's button click event is called through javascript but would like to take it one step further and remove the hidden button.

Is this possible?

This is what I currently have:
<script type="text/javascript">  
    function SomeFunction()  
    {  
        document.getElementById('<%=Button1.ClientID%>').click();  
    }  
</script>  
 

This is what I would like to do:
<script type="text/javascript">  
    function SomeFunction()  
    {  
        //call a server side method 
    }  
</script> 

Regards
Alex

1 Answer, 1 is accepted

Sort by
0
Jason Monroe
Top achievements
Rank 1
answered on 03 Jul 2007, 03:15 PM
I made a blog post here that describes how to use javascript to execute server side code via the RadAjaxManager...

The post describes specifically use with the WindowManager.. but you can adapt it for use with anything, including from your flash object.


Tags
Getting started with ASP.NET
Asked by
Axe
Top achievements
Rank 1
Answers by
Jason Monroe
Top achievements
Rank 1
Share this question
or