0

I have c# function which returns true/false, I want a JavaScript function to call this c# function and depending on the return value of the c# function, if true, I need the JavaScript function to show an alert.

So please How can I call a c# function in a JavaScript function? Thank you

user1947393
  • 153
  • 4
  • 18
  • 1
    better to use ajax for doing this – Arunprasanth K V Mar 10 '15 at 07:21
  • 1
    This post will guide you to call C# method from Javascript/jQuery, http://encosia.com/using-jquery-to-directly-call-aspnet-ajax-page-methods/ – Adil Mar 10 '15 at 07:22
  • You should add more details, e.g. how your javascript code should interact with C#. Is your C# server side? If so, which server/technology? Is it some code embedding a javascript interpreter? If so, which one? – Mario Mar 10 '15 at 07:23
  • Check this http://www.dotnetcurry.com/showarticle.aspx?ID=109&AspxAutoDetectCookieSupport=1 – nuclear sweet Mar 10 '15 at 07:23
  • Also: http://stackoverflow.com/questions/5828803/how-to-call-code-behind-server-method-from-a-client-side-javascript-function – yazanpro Mar 10 '15 at 07:54

0 Answers0