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
相关文档:
在c# / ASP.net中我们可以通过使用DataTime这个类来获取当前的时间。通过调用类中的各种方法我们可以获取不同的时间:如:日期(2008-09-04)、时间(12:12:12)、日期+时间(2008-09-04 12:11:10)等。
//获取日期+时间
DateTime.Now.ToString(); // 2008- ......
首先申明 纯属个人练习之作 请勿用于商业目的..........无语
纪念一下我以前的一个作品<窥>,以后就用它当我的LOGO了
今天是首发,这篇文章我会持续更新,我参照了园区里前辈的经验,摸索着去实现,目前大体的还未完善,先发张图上来...
......
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 ......