asp.net网页静态化
一。①:首先要有这个文件URLRewriter.dll,如果没有,赶快到网上下载一个,并将其放到下面的bin目录里面,并且将其引用添加到下面里面;
②:下面就是Web.Config文件的配置了,当然,配置过程相当简单:
1:先添加这个
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections>
<RewriterConfig>
<Rules>
<!-- Rules for Blog Content Displayer -->
<RewriterRule>
<LookFor>~/(.[0-9]*)\.html</LookFor>
<SendTo>~/ArticleDetail.aspx?MyID=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
2:再添加这个
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
至此,已成功一大半,上面两个都添加到Web.Config,添加到什么位置看来没必要讲了!
最后一步:在IIS中找到自己的虚拟目录网站,点属性,然后点配置,然后弹出应用程序配置对话框,选择添加,添加的可执行文件路径为c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll,扩展名为.html(如果是虚拟主机,可购买使用九网互联的主机,可直接在线操作开通伪静态
二。
view plaincopy to clipboardprint?
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
namespace Web.Admin
{
public partial class Admin_MakeIndex : System.Web.UI.Page
{
&n
相关文档:
在Windows NT中,图形多媒体系统基于层次结构。应用程序与顶层的API(实际上是多个用户模式的系统DLL,比如GDI32.DLL)交互,这些系统DLL最终会通过系统服务调用处于内核模式的系统服务。
NT系统的详细信息可参考《Windows 图形编程》的第一、二章。在Windows Vista中,图形系统已经移出了内核模式,并有自己的空间 ......
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections.Generic;
using System.Text;
namespace Maticsoft.DBUtility
{
/// <summary>
  ......
//TransmitFile实现下载
protected void Button1_Click(object sender, EventArgs e)
{
/*
微软为Response对象提供了一个新的方法TransmitFile来解决使用Respo ......
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="s ......
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
namespace jiu ......