gcmachel
asked on
ASP Include problem
Hi,
I am planning to move all my DB related code into a separate file. So i have two files a.asp and b.asp.
a.asp has all the calls to b.asp.
I have all the common code in b.asp.
a.asp
<%@language=vbscript%>
<!--#include file="b.asp"-->
<%
call hai()
%>
b.asp
<%@language=vbscript%>
<%
sub hai()
response.write ("hai")
end sub
%>
but it throws error in a.asp when i try to call hai(). Let me know what i am doing wrong?
Regards, G
I am planning to move all my DB related code into a separate file. So i have two files a.asp and b.asp.
a.asp has all the calls to b.asp.
I have all the common code in b.asp.
a.asp
<%@language=vbscript%>
<!--#include file="b.asp"-->
<%
call hai()
%>
b.asp
<%@language=vbscript%>
<%
sub hai()
response.write ("hai")
end sub
%>
but it throws error in a.asp when i try to call hai(). Let me know what i am doing wrong?
Regards, G
just remove from b file this code <%@language=vbscript%> and when u execute the a page be sure u executed from server not by just click on the page in explorer. The <!--#include file="b.asp"--> tag is executed on the server. When u execute it from explorer it doesn't run the code.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
also, whats the error