Here Mudassar Ahmed Khan has explained with an example, how to call Server Side function from JavaScript without PostBack in ASP.Net using C# and VB.Net.
In order to call a Server Side function from JavaScript, it must be declared as static (C#) and Shared (VB.Net) and is decorated with WebMethod attribute.
Then the Server Side method can be easily called with the help of ASP.Net AJAX PageMethods and JavaScript without PostBack in ASP.Net.
↧