The text of this article is not in this database — only its details are. Read it on the old site: Calling an ASP.NET C# Method (Web Method) Using JavaScript
28 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.

Michel RodriguesPosted Jul 15, 2023, 5:29 AM
Hello! I am getting the following error message: WebForm5:17 Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received.and it is returning the aspx code in alert(), could you help me please?
sagar metkarPosted Oct 12, 2018, 5:03 AM
Very nice it's working for asp.net project
Andrew KelsonPosted Dec 13, 2016, 5:53 PM
How can I handle calling a second PageMethod upon a user's confirmation of the results from the first PageMethod? When I try this now, the alert in the second WebMethod's success function is never reached, even though the WebMethod executes as expected. Thanks.
Upendra Pratap ShahiPosted Sep 30, 2015, 5:04 AM
nice
sk guptaPosted Sep 19, 2015, 7:45 AM
Sir when i using "Calling WebService using Javascript" programme then an error occur which is as follows : "WebService Not Defined", so please suggest me a valuable help to resolve this. Thanks in Advance...
Deepan RajanPosted Jul 7, 2015, 5:04 AM
fqef
abhi dasPosted Jan 28, 2015, 2:18 PM
thanks for this post.. you solved my lot of issue.
Manish Kumar ChoudharyPosted Nov 24, 2014, 6:25 AM
thanks sir.
ati MPosted Nov 24, 2014, 6:16 AM
hi.thanks for your post. i want use result value to change a label text. some thing such as : $("#LblOrderVal").attr("text", result); in onSucess function . but it doesnt work
saurabh saxenaPosted Sep 11, 2014, 8:02 AM
is this value storing in database too?
Robert JuradoPosted Aug 28, 2014, 1:26 AM
If I want to throw an error and/or return a string value from the PageMethod, how do I do that? Thanks in advance.
Rizwan MohammadPosted May 23, 2014, 2:23 AM
Thank you i got it.............................
Rizwan MohammadPosted May 23, 2014, 2:15 AM
Hi friends hear code work but i got an error call Uncaught ReferenceError: PageMethods is not defined so plz tell me how can i resolve this is error
Santosh YadavPosted Oct 18, 2013, 1:10 PM
you are right Bajinder.
bajinder MannPosted Oct 18, 2013, 9:25 AM
Dear Sir, this code is not working on webuser controle please check and help me its very argent. tnks
Santosh YadavPosted Apr 20, 2013, 2:00 PM
Great work sir...Very helpful article
Venkatesh EllurPosted Apr 19, 2013, 2:23 AM
This is an excellent example.... Very Simple and Clear.. Thanks ABhimanyu.
sarfaraj mdPosted Dec 28, 2012, 5:57 AM
niceeee
Chirag SolankiPosted Aug 24, 2012, 9:56 AM
thx . it help
shreeniwas kushwahPosted Aug 21, 2012, 8:40 AM
Thanks Abhimanyu to this excellent example....!
Megha GoyaleditedPosted Jul 26, 2012, 10:55 PMEdited Jul 27, 2012, 12:00 AM
Thanks Abhimanyu i used camtasia but can u tell me how can i convert my video in camtasia as an image.
Akil A MPosted Jul 25, 2012, 10:30 AM
Okey,,, if we want to get the value from Database then. how it work.. please Explain me with one example please. my email id is [email protected]
Abhimanyu K VatsaPosted Jul 23, 2012, 5:30 AM
i have recorded the screen using camtasia.
Megha GoyalPosted Jul 23, 2012, 5:18 AM
How to animate the pictures which you have post in this article please tell me the procedure of doing this.