首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

includ的简单有关问题

2012-01-13 
includ的简单问题我就是想做一个head.aspx与一个foot.aspx的两个经常用的网页,在index.aspx网站中应该怎么

includ的简单问题
我就是想做一个head.aspx与一个foot.aspx的两个经常用的网页,在index.aspx网站中应该怎么引用过来!还有我在书上面看到保存为head.inc与foot.inc,在index.aspx网页加 <!--#include   virtual= "head.aspx "--> 怎么引用不了.郁闷死了.那位大哥知道给几个实例.详细点最好!

[解决办法]
【上部分文件:head.aspx】




<s cript runat=server>

void click1 (object a,EventArgs b)

{ label1.Text=text1.Text;

label2.Text=text2.Text;}

</s cript>



<h1> The Softzz 's New page </h1>

<p> 2004-11-15 </p>

Name: <asp:textbox id= "text1 " runat= "server "/>

&nbsp;&nbsp;

Pass: <asp:textbox id= "text2 " runat= "server "

textmode= "password "/>

&nbsp;&nbsp;

<asp:button id= "button1 " runat= "server "

Text= "ClickMe " onClick= "click1 "/>

<HR width= "80% " SIZE= "1 ">




【上部分文件:end.a】




<s cript runat=server>

void click2 (object a,EventArgs b)

{ label1.Text=text3.Text;

label2.Text=text4.Text;

}

</s cript>



<HR width= "80% " SIZE= "1 ">

Name: <asp:textbox id= "text3 " runat= "server "/>

&nbsp;&nbsp;

Pass: <asp:textbox id= "text4 " runat= "server "

textmode= "password "/>

&nbsp;&nbsp;

<asp:button id= "button2 " runat= "server "

Text= "ClickMe " onClick= "click2 "/>

<h5> <%= DateTime.Now.ToString() %> </h5>

<b> <p> CopyRight: SoftZZ </p> </b>




【主文件:index.aspx】

<%@ Page Language=C# %>

<center>

<form runat=server>

<!-- #include file= "head.aspx " -->

<br/>

<p> This is a new test page.Please look at the info: </p>

<br/> <br/>

User 's Name:&nbsp; <b> <asp:label id=label1 runat=server/> </b>

<br/> <br/>

User 's Pass:&nbsp; <b> <asp:label id=label2 runat=server/> </b>

<br/> <br/>

<!-- #include file= "end.a " -->

</form>

</center>

热点排行