0

I need to call a .cs method from JavaScript function; how can I do that?

Thanks

2
  • Please add some more detail about your situation. Commented Aug 15, 2010 at 8:18
  • 2
    Here's how google.com/… and notice that those are limited only to answers you already have on StackOverflow (according to Google about 50,200 results). Simply pick the one that works in your scenario (which by the way you haven't defined). Commented Aug 15, 2010 at 8:23

2 Answers 2

1

You need to do post back to the server then catch this post back on Pageload event then execute the cs function.

check the following article: Understanding the JavaScript __doPostBack Function

Sign up to request clarification or add additional context in comments.

Comments

0

You need to postback to the server by either submitting an HTML form or using JavaScript. If you're not in a browser, it might be more of a challenge because I don't think the Windows Scripting Host includes anything that can call the web by default. In which case you could use something like cURL instead.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.