自定义控件 加入include 报错 问题

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Head_Index.ascx.cs" Inherits="Head_Index" %>
<%@ Register Src="TopBoards.ascx" TagName="TopBoards" TagPrefix="uc1" %>


<!--#include file=" /Common/head/head.html"-->

<uc1:TopBoards ID="TopBoards1" runat="server" />

<div id="Landing_big" style="width:960px;">
<div id="dvUnLogin" runat="server" class="Landing_1" style="float:left;width:960px;">
<iframe ID="loginFr" src="qbaobei_login.htm" frameborder="0" scrolling="no" width="100%" height="26" allowtransparency="true"></iframe>
</div>
</div>
报未知路径错误  
<!--#include file=" /Common/head/head.html"-->
改成
<!--#include file=" <%= ResolveUrl("/Common/head/head.html") %>"-->
就行了



posted @ 2011-09-28 21:35  奇幻男孩  阅读(287)  评论(0编辑  收藏  举报