Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP function Call

Status
Not open for further replies.

wilberforce2

IS-IT--Management
Jan 8, 2007
36
GB
Hello all

I am new to ajax however I have got the server sites scripts responding nicely. I was wondering Is it possible to call separate functions within the ASP page? If not what is the procedure for more complex programs do you have separate files for separate commands?

I have tried using a select statement that reads a post command to call sub programs and functions but unfortunately it don’t work.

Code:
<%

'if request.Form("Calling") <> "" then
	SELECT case request.form("Calling")
		Case "sayhello"
			sayHello
		Case "sayGoodbye"
			sayGoodbye
		case else
			response.Write("noute")
	End Select
'End if

sub sayHello
	Response.write("ASP Hello")
end Sub

sub sayGoodbe
	Response.write("ASP Goobye")
End Sub

%>
 
Please ignore my spelling errors in the code above. It is now working. I would still be interested if this is the best was of going about calling functions/sub's?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top