Calling external sub

M

Marcel

Im wanting to call a sub funvtion on another page from vbs that is
<SCRIPT LANGUAGE=vbscript RUNAT=Server>
sql="exec SomeStoredProc"
call DoConnection(sql)
Response.write(recordset.getstring)
call DBClose()
</SCRIPT>

the DoConnection sub is in another page called MyDBConnection in a folder
call Common.

I know that I can use serverside includes and embed my con in the page
using <%%> but I want the use runat server

How can I make call to a function in an external page?
 
R

Ray Costanzo [MVP]

Why does it matter? If you want to /include/ a file, you have to /include/
the file. And that's unrelated to <% %> vs. <script
runat="server"></script>, since you'd write:

<!-- #include file="filename.asp" -->

Ray at home
 
P

paul

And of course one can use functions conditionally from an included
page.
From the calling page:

<!--#include file="myutilityfunctions.asp"-->

<%
Select Case MyVar
Case MyVar 1
MyFunction1FromOtherPage()
Case MyVar 2
MyFunction2FromOtherPage()
Case MyVar 3
MyFunction3FromOtherPage()
End Select
%>

Best regards,
-Paul
www.Bullschmidt.com - Freelance Web and Database Developer
www.Bullschmidt.com/DevTip.asp - ASP Design Tips
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top