加入方法是一样的,我的代码是
<!--#include file="../../Include/Inc.htm"-->

解决方案 »

  1.   

    <!-- #include file="top.inc" -->一样的
      

  2.   

    如果你的页眉是所有页面都需要的,可以考虑在global.asax中进行一些设定,比如设定beginrequest事件中处理:
    protected void Application_BeginRequest(Object sender, EventArgs e)
    {
    Response.Write("<table><tr>");
                               Response.Write("other html contents which you want to use in included file...");
    }
    也可以用web.config进行设定,然后在页面中引用这些设置
    用application对象也是一个办法,总之方法很多的,看你具体需求
      

  3.   

    可是我用<!-- #include file="top.inc" -->在asp.net,怎么不行呢
    在<body>后加入的
    liangzy(阿良)我试一下你的方法
      

  4.   

    asp.net 中用<!--#include file="top.htm"-->应该可以!
      

  5.   

    我试了!<!--#include file="top.htm"-->是可行的!
      

  6.   

    在asp.net里面是可以使用#include的,你应该看一下你的aspx页面在客户端生成页面的源文件,找到相应位置,看看怎么回事
      

  7.   

    可是我用iis浏览的,不行呀,aspx页面在客户端生成页面的源文件中有这个<!--#include file="top.htm"-->,好像把它当作注释了
    我用iis浏览,.asp的就可以,.aspx就不显示,也不出现错误。我也很着急,大家帮忙呀
      

  8.   

    <body>
    <!--#include file="top.htm"-->
    <table width="766" border="0">
    我就放在这个位置,还是不行,大家给你一个例子,成功的,我试一试
      

  9.   

    谢谢大家,我已经解决了,是我的asp.net配置问题。我这就给分