Click to See Complete Forum and Search --> : VB Functions in ASP


karlmcauley
08-13-2003, 10:38 AM
Has anyone any good websites/examples (basic) on doing normal vb functions within an ASP document?

I know how to do vb functions normally but is there limitations of it within asp and how do i call a function within asp?

Any help and guidance would be appreciated.

many thanks

karlmcauley
08-14-2003, 06:29 AM
Dave......i had a look at the vbscript link from microsoft you have and it does deal with calling routines within the submission of a form but i dont necessarily want the function/routines to be on the same page as my general code.

so if i wish to call a function within a include file on the submission of a form what's wrong with declaring the include file as:

<!-- #include virtual = "/SC_Functions/SC_Functions.inc" -->

and calling the function within that include file as;

<form name="reportinfo" method="post" onsubmit="Perform_Validation(txtYear, txtUICode)" action="report_generator.asp?reportid=<% Response.Write(lonReportID) %>" >

txtYear and txtUICode are names of the textboxes with values in them on the form and lonReportID is a variable with the report number that is retrieved from the previous screen.

Its probably staring me in the face but.....
Any help would be appreciated.

rdoekes
08-14-2003, 06:34 AM
The form elements form the form you are using, are visible only to ASP when you submit the form to the server. The onSubmit method is called before the form is actually submitted and allows for client-side validation routines.

ASP's Request.Form collection is called when the request is send back to the server for processing to the page specified in the action parameter.

If you would like to do validation with the perform_validation function, i must be done in client-side javascript or client-side vbscript.