能不能把C#脚本写到inc文件中在aspx页面中掉用
同上:
//可不可以这样写,如果这样写不幸,写成类的话,我怎么实现?然后怎么使用
1.inc
<%
void ShowHtml()
{
Response.Write("<html>");
...........
}
void ShowEnd()
{
.................
Response.Write(</html>);
}
%>
2.aspx
<!--#include file="1.inc">
<%
ShowHtml();
%>
我的页面
<%
ShowEnd();
%>