ASP.NET静态页面生成及分页的实现
ASP.NET静态页面生成代码
1、静态模板页面 template.html,主要是定义了一些特殊字符,用来被替换。
< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> < html> < head> < meta http-equiv="Content-Type" content="text/html; charset=gb2312"> < title>Title < /title> < /head> < body> < div style="width: 417px; height: 54px" align="center"> < br /> Title < /div> < div style="width: 417px; height: 8px"> 浏览 < font color="red"> < script src="http://localhost/.Net/NewsFiles/ClickCount.aspx?NewsId=NewsId"> < /script> < /font>次 Time < /div> < div style="width: 417px; height: 100px"> Content < /div> < div style="width: 416px; height: 9px"> Pager < /div> < div style="width: 416px; height: 8px"> < form id="form1" action="../AddComment.aspx" style="margin:0px"> < input id="Text1" type="text" /> < Img id="Image1" src="http://www.dwww.cn/UserInfo/CheckCode.aspx"/> < br /> < textarea id="CommentContent" cols="20" rows="2"> < /textarea> < br /> < input id="NewsId" type="hidden" value="NewsId"/> < input id="Button1" type="subm
相关文档:
ASP.NET编程的十大技巧
发布日期:2008-08-03
1、在使用Visual Studio .NET时,除直接或非引用的对象外,不要使用缺省的名字
.NET带来的好处之一是所有的源代码和配置文件都是纯文本文件,能够使用Notepad或WordPad等任意的文本编辑器进行编辑。如果不愿 意,我们并非一定要使用Visual Studio .NET作为集成开发环境。 ......
实现ASP.NET生成随机密码功能是很容易的,下面的代码给出了完整的实现方法:
public static string MakePassWord(string PwdChars, int Pwdlen)
{
string mpstr = "";
int iRandNum;
Random mrnd = new Random();
for (int ......
首先,在pageload里写入以下代码:Response.Write("<script>window.opener=null;window.close();</script>");
其次,在head里写下如下JS代码: <script language="JavaScript">
<!--
function openwin() { window.open ("Default.aspx", "newwindow", "height=600, width=600, toolbar=no, menubar=n ......
主要类:
System.Web.HttpRuntime
System.Web.HttpApplicationFactory
System.Web.HttpApplication
System.Web.Compilation.BuildManager
System.Web.Compilation.ApplicationBuildProvider
System.Web.Compilation.BuildProvidersCompiler
System.Web.UI.PageHandlerFactory
请求处理 ......