hello all,
i'm new to .net and trying to migrate asp to asp.net.
my issue is with include files. i've got an ASP file this way:
file file1.inc is:Code:<% Dim MyVar MyVar = "file1.inc" %> <html> <body> <!--#include file="<%=MyVar%>"--> </body> </html>
what i want to do:Code:<% Response.Write "HELLO!" %>
1. define the name file1.inc programmatically (like in the ASP.OLD example here above);
2. make sure the included file CAN RUN some code (like in the ASP.OLD example here above).
so:
1.
i just can't get to have an include file defined programmatically like this in asp.net: using <!--#include file="<%=MyVar%>"--> in asp.net won't do since it interprets the <% as wrong path character (basically, doesn't read it as code).
i'm trying thehowever apparently i can't define the Src tag on code: if left empty or not an .ascx file it generates errors.Code:<%@ Register TagPrefix="topMenu" TagName="topMenu" Src="topMenu.ascx" %>
2.
M$ suggests the Response.WriteFile method, however this does not allow execution of code, of course!
what the...?any suggestions? getting crazy on this one.
cheers and thank to you all,
wc.




any suggestions? getting crazy on this one.
Reply With Quote