|
-
May 20th, 2003, 06:36 PM
#1
Thread Starter
PowerPoster
#include
Hi, How come my INCLUDE statements are just rpinting on the page as text instead of actually including the file?
<--#INCLUDE VIRTUAL="topnav.htm"-->
<--#INCLUDE VIRTUAL="sidenav.htm"-->
it just prints that as text. I have it in an aspx file.
Example code.
VB Code:
<%@ Page CodeBehind="specialeventinfo.aspx.vb" Language="vb" AutoEventWireup="false" Inherits="OptimaBackEndTest.specialeventinfo" %>
<--#INCLUDE VIRTUAL="topnav.htm"-->
<--#INCLUDE VIRTUAL="sidenav.htm"-->
<script language="JavaScript">
<!--
function Validate(){ //v2.0
if(document.form.txtEventTitle.value == "" || document.form.txtFeatureText.value == ""){
alert("All fields must be filled in.");
}
}
function MoveVars() { //v2.0
var title = document.form.txtEventTitle.value;
var info = document.form.txtEventInfo.value;
document.form2.PreTitle.value =title;
document.form2.PreInfo.value =info;
}
//-->
</script>
<td valign="top">
<table width="549" height="97" border="0" cellpadding="10" cellspacing="2">
<tr>
thanks!
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
May 20th, 2003, 08:00 PM
#2
Lively Member
<!-- #Include File="file.htm" --> should work
"Find all you need in your mind if you take the time" -DT
-
May 20th, 2003, 09:27 PM
#3
Thread Starter
PowerPoster
Nope deosnt work.. same thing.
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
May 20th, 2003, 09:43 PM
#4
PowerPoster
Go to this link and scroll down to this section:
Include files with ASP.NET: enter User Controls
http://www.xefteri.com/articles/23dec2002/default.aspx
-
May 20th, 2003, 10:45 PM
#5
Thread Starter
PowerPoster
thats intersting hells, but it doesn't solve my problem. Should not my includes work?
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
May 20th, 2003, 11:04 PM
#6
PowerPoster
I have no idea if they are supported in aspx files...
But your syntax seems to be wrong:
You have:
<--#INCLUDE VIRTUAL="topnav.htm"-->
I think it should be:
<!-- #include virtual="topnav.htm"-->
-
May 21st, 2003, 12:25 AM
#7
Thread Starter
PowerPoster
Yep that was it.. My book and Cin0s both posted the ! and i didnt see it either time haha... thanks!
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|