ASP.net & Javascript

mike55

Contributor
Joined
Mar 26, 2004
Messages
727
Location
Ireland
Hi

Anyone know if it is possible to create a javascript function which can call an asp function???

Mike55
 
Javascript and ASP are separate because they are Client(javascript) and Server(asp).
You'll be forced to do a round trip to the server to execute the ASP function. What you could do... is put an hidden field... and when the page load... you execute a specific function if the hidden field isn't empty... that's the only way I can see it.
 
Maybe another way is using IFrame or sub-windows to execute your asp page instead of your original page
 
bungpeng said:
Maybe another way is using IFrame or sub-windows to execute your asp page instead of your original page

Am using a component that is heavily linked to javascript, what i need to do is when i click on the component, a confirmation dialog appears asking do you want to continue or not, if you select yes, then the menu should call a simple asp.net function. Have got to the point where i have the confirmation dialog, but can't get beyond it. Would appreciate any suggestions, however it has to be done in javascript.

Mike55
 
bungpeng said:
It depend on what actually the function will do


Ok

For simplicity, lets say that the function simple sets the text of a lable to the word "Hello", so my function in asp.net is

sub label_change()
label1.text = "Hello"
end sub
 
Back
Top