Click here to Skip to main content
15,924,553 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends,

we are looking to how to call a c# function from javascript if any one having solution for this problem plz suggest me


thank you!
Posted

Please read here: Call a code behind function from ASP page[^].

Cheers!

--MRB
 
Share this answer
 
I googled it ("call c# method from javascript") and got 5.7 million results. The first result had a link to this:

http://weblogs.asp.net/mschwarz/archive/2005/02/15/373072.aspx[^]

You can google it, too... It's free.
 
Share this answer
 
Alternitavely look here[^]

Basically you use JQuery to call a (static) webmethod defined in an aspx page.
There are some articles around so search google and come back with questions if you get stuck.

If you don't know JQuery look here[^]

Whatever you do, I feel that calling server side code from client is still more like hacking or a workaround than an actual solution. If you can avoid this by redesigning, do so.

hope this helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900