469,270 Members | 1,146 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

Calling external sub

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?
Jan 12 '06 #1
2 1972
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

"Marcel" <Ma****@discussions.microsoft.com> wrote in message
news:53**********************************@microsof t.com...
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?

Jan 13 '06 #2
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

Jan 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Sivakumar Shanmugam | last post: by
11 posts views Thread by RichN | last post: by
5 posts views Thread by Newbie Coder | last post: by
47 posts views Thread by teju | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.