Hello, I want to know how can I call VB.NET (Server Side) function to Javascript (Client Side). I want to insert function here in my Javascript code;

function ConfirmSave() 
  
{  
  
var Ok = confirm('Proceed to Save?'); 
  
if(Ok==true) 
 return true; 
else if(Ok!=true) 
 return false; 
  
  
 }

I want to exefcute the Save() function from my VB.Net code when I return true. Please Help me. I need it so badly. Thank you.

If you don't want to reload the page doing this, you probably need AJAX.

how can I do that?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.