简体   繁体   中英

Calling ajax method from JavaScript using telerik

How can i use ASP.NET telerik ajax just to call server method from JavaScript's method and get some results, so transfer of parameters and result should be done using ajax, and after that i want to use JavaScript to update component? I need some example or things that i should use.

try this

   //aspx
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">

            </telerik:RadAjaxManager>





//client side


    function ToolbarButtonClick(sender, args){

     var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");

     ajaxManager.ajaxRequest("test");


        return false;

    }







//server side


    Public Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As AjaxRequestEventArgs)

        Select Case e.Argument

            Case "Send"

         ' something



        End Select

    End Sub

http://www.telerik.com/community/forums/aspnet-ajax/ajax/calling-server-side-method-from-javascript.aspx#742362

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM