In Web forms, .Net applications to call the client side scripts like javascript and Jquery web calls are handled by using WebMethod and ScriptMethod Attributes. This method uses the shared function keyword from server-side pages. The function which mentioned with Shared keyword and WebMethod attribute exposed by WebService will send Post and get a request on that. For sharing json format data also same kind of web method will be used. The code example is given below.
Server End code
From the client end, an OnClick event will be sent a request for getting a server date & timely response. The client-side code example is below.
Output
![Get current server time]()