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

Calling server side method from client side javascript

1 Answer 769 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Srinivas
Top achievements
Rank 1
Srinivas asked on 11 Jan 2011, 09:53 AM
Hello Telerik,

Is there a mechanism for calling the serverside method from client side java script function written at the aspx page with asp.net ajax controls ?
I know a mechanism like 'page methods' ,but in this the method we can should be 'Static' and also a 'Webemethod' . which is not useful for me.

I mean something like,
In my aspx page the clientside event calls a javascript function which should call the serverside event handler of that control .
Ex: radlist box's onclientselectionchanged =" call server"  in which i want to call the ' radlistbox1_selectionchanged ' event.

Thanks in advance,
Srinivas

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 11 Jan 2011, 12:16 PM
Hello Srinivas,

You can achieve the desired functionality by invoking an ajaxRequest() from client side. And from the AjaxRequest event handler (serverside) you can call the desired function.

Shinu.
Tags
Ajax
Asked by
Srinivas
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or