calling a .NET function within a javascript function
-
Hi, I have two functions; one is in C# and the other one is in javascipt. There is a need for me to call the C# function inside the javascipt function. How can I achieve this? (please give an example using either C# or VB.NET)
-
Hi, I have two functions; one is in C# and the other one is in javascipt. There is a need for me to call the C# function inside the javascipt function. How can I achieve this? (please give an example using either C# or VB.NET)
To the best of my knowledge, you cannot call a server side function from client side script (i.e. Javascript). I think there is only way to achieve this, i.e. use AJAX.
-
To the best of my knowledge, you cannot call a server side function from client side script (i.e. Javascript). I think there is only way to achieve this, i.e. use AJAX.
Not strictly true - put a hidden button on the form (Width="0" NOT Visible="false" cos this will prevent it being rendered), then get the javascript to click the button using document.getElementById('myButton').click(); "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox