ASP.NET中根据模板生成静态页!
template.htm模板页源码:
1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2. <html xmlns="http://www.w3.org/1999/xhtml" >
3. <head>
4. <title> $title$ </title>
5. <meta http-equiv=content-type content="text/html; charset=UTF-8" />
6. <mce:style type="text/css"><!--
7. <!--
8. .STYLE1 {
9. font-size: 16px;
10. font-weight: bold;
11. }
12. -->
13.
--></mce:style><style type="text/css" mce_bogus="1">
7. <!--
8. .STYLE1 {
9. font-size: 16px;
10. font-weight: bold;
11. }
12. -->
13. </style>
14. </head>
15. <body>
16. <br />
17. <br />
18. <table width="100%" border="0" bgcolor="#339900">
19. <tr>
20. <td height="34" align="center" bgcolor="#FFFFFF"><span class="STYLE1">$title$ </span></td>
21. </tr>
22. <tr>
23. <td height="42" bgcolor="#FFFFFF"><br />
24. <br />
25. 内容:$content$ </td>
26. </tr>
27. </table>
28. <a href="http://www.51aspx.com" mce_href="http://www.51aspx.com" target="_blank">51aspx.com 版权所有</a>
29. </body>
30. </html>
Default.aspx页面源码:
1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
2.
3. <!DOCTYPE html PUBLIC &quo
相关文档:
使用ASP.Net Forms模式实现WebService身份验证
在安全性要求不是很高的ASP.Net程序中,基于Forms的身份验证是经常使用的一种方式,而如果需要对WebService进行身份验证,最常用的可能是基于Soap 标头的自定义身份验证方式。如果对两者做一下比较的话,显然,基于Forms的验证方式更加方便易用,能否将F ......
本贴来自ZDNetChina中文社区 http://bbs.zdnet.com.cn/
本贴地址:http://bbs.zdnet.com.cn/viewthread.php?tid=108315
如果你已经有较多的面向对象开发经验,跳过以下这两步:
第一步 掌握一门.NET面向对象语言,C#或VB.NET 我强烈反对在没系统学过一门面向对象(OO)语言的前提下去学ASP.NET。 ASP.NET是 ......
控制网站分辨率 我们可以 用 frameset
虽然 asp.net不支持这个属性 但是功能是可以实现的
如 :
<frameset name="main" rows="105,*" frameborder="no" border="0" framespacing="0">
<frame src="xx.aspx" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" /> ......
PRB:在使用 Response.End、Response.Redirect 或 Server.Transfer 时出现 ThreadAbortException
症状
如果使用 Response.End、Response.Redirect 或 Server.Transfer 方法,将出现 ThreadAbortException 异常。您可以使用 try-catch 语句捕获此异常。
原因
Response.End 方法终止页的执行,并将此执行切换到应用程序 ......