Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Calling external sub

Reply
Thread Tools

Calling external sub

 
 
Marcel
Guest
Posts: n/a
 
      01-12-2006
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?


 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      01-13-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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?
>
>



 
Reply With Quote
 
 
 
 
paul@bullschmidt.com
Guest
Posts: n/a
 
      01-16-2006
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Death To Sub-Sub-Sub-Directories! Lawrence D'Oliveiro Java 92 05-20-2011 06:50 AM
Recognising Sub-Items and sub-sub items using xslt Ben XML 2 09-19-2007 09:35 AM
Question about sub calling other sub Martin Kissner Perl Misc 8 03-09-2006 06:21 PM
Legitimate use of calling a sub as &sub Richard Gration Perl Misc 1 02-23-2005 05:43 PM
how do make a pop-up in sub ASP.net sub ? THY ASP .Net 1 08-18-2003 11:30 PM



Advertisments