Title: Call Ajax Method in javascript                                 If you need copy same format use firefox or chrome or safari but iexplorer not work


Preview of Code
Here is Some Simple Coding About HOW TO CALL SERVER SIDE METHOD FROM JAVASCRIPT
 
1 .  Write HTML For Any Control from which You want to Call Javascript as Follow, Here We
      Have A button on Its Click Event JS Function will Called.
 
<input type="button" value="sd" onclick="me();" />
 
2.   Now Write Java Script Function that Call Server Side Method
<script type="text/javascript">
        function me() {
        var result = _00Test.Hello();
        alert(result.value);
        }
</script>
     Here  “_OOTest” is the class Of Page  and “Hello()” is function Name, result will
     Occupy value that returns from called function.
 
3.   Now Create Ajax Method in Code Behind Like :
 
Imports Ajax
 
Partial Class _00Test
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) 
                            Handles Me.Load
           Ajax.Utility.RegisterTypeForAjax(GetType(_00Test))
    End Sub
    ``` <summary>
    ```  Function That Called from JavaScript
    ``` </summary>
    <Ajax.AjaxMethod(Ajax.HttpSessionStateRequirement.ReadWrite)> _
    Public Function Hello() As String
        Return "Ajay Patel"
    End Function
End Class