How to call .cs function present using javascript code by not using any button or any onclick event.
Please help me out.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
K P Singh ChundawatPosted Jan 10, 2015, 12:06 PM
if you are using Asp,net then you can use Webmethod and call it on page load event by using this syntax
Cs Method syntax :- [System.Web.Services.WebMethod]
public static string GetContactName(string custid) { }
jequery syntax $.getJSON('/my/url', function(data) {});
-------------------------------------------------------------------------------------------------------------------
If this is correct answer then please mark it as 'Accepted Answer'
KP Singh