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作为集成开发环境。 ......
最近遇到要读取QQ相册的问题,所以自己诼磨了下,把读取相册的思路和代码写下来。
很多网站到图片链接都做了盗链处理。意思是如果你想在不是他的网站上引用图片就不会正确显示图片,而是一张其它的版权说明之类的图片。实现防盗链的一般做好是通过判断Request的Headers中的Re ......
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Mail;
using System.Net.Mime;
using System.Net.Configuration;
namespace BCore.PubFunction
{
public class MailHandler
{
&n ......
首先,在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 ......
文件上传界面既可以用Html的input file控件,又可以用FileUpload控件,只要将Html的input file控件加上runat="server",就会发现两者的功能完全是一模一样,上传的代码是共用的,不需要做任何改变。我想微软在将Html控件将成标准控件时应该只是多加了runat="server"吧。放入上述两者的任一控件后,添加一个标准的Button按钮 ......