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里面,很多时候使用session来保存一些对象,比如说购物车等等,有很多时候,就算你设置了session超时的时间,session还是会无缘无故的丢失,这里有一种比较简单的方法可以设置session丢失的时间。
在web.config里面如下配置
<sessionState
& ......
Asp.net 自动发送邮件的方法
今天有一个模块需要自动发送邮件的功能,就随便写了一个,记录一下作为积累。
一、首先需要配置web.config文件:
<system.net>
<mailSettings>
<smtp from="Emailname">
<network ho ......
1.对IE浏览器进行设置
文件-〉页面设置-〉将里面的页眉和页脚的内容清空 就OK了
2.页面代码实现 Javascript
<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><!-- & ......
PRB:在使用 Response.End、Response.Redirect 或 Server.Transfer 时出现 ThreadAbortException
症状
如果使用 Response.End、Response.Redirect 或 Server.Transfer 方法,将出现 ThreadAbortException 异常。您可以使用 try-catch 语句捕获此异常。
原因
Response.End 方法终止页的执行,并将此执行切换到应用程序 ......
ASP.NET(C#)返回上一页(后退)代码
2008-08-10 10:32
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ViewState["BackUrl"] = Request.UrlReferrer.ToString();
}
}
/// <s ......