有做过asp.net 伪静态的例子 要c#代码的、给小弟学习一下、最好有demo 发送邮箱到 [email protected]在留下你在csdn的名称 立即给分 在线的等、、、

解决方案 »

  1.   

    http://laziofly1983.spaces.live.com/blog/cns!5F2E828FE92130CE!1864.entry
      

  2.   

    指的是什么?一般都是重写url就够了.
      

  3.   

    url重写的例子非常多。自己找下就有了。
      

  4.   

    恩 就是把 index.aspx 地址变成 index.html 地址就行了
      

  5.   

    如果是url重写不需要写代码阿,只需要配置就可以阿
      

  6.   

    [转贴]原信息URL:http://www.jiaonan.net/html/blog/1/23066.htm
    web.config:  <system.web>
        <httpModules> 
         <add name="UrlRewrite" type="UrlRewrite.Rewrite, UrlRewrite" /> 
     </httpModules>
     </system.web>
      Rewrite.cs:
    using System;
    using System.Web;namespace UrlRewrite
    {
     /**//// <summary>
     /// Rewrite 的摘要说明。
     /// </summary>
     public class Rewrite:System.Web.IHttpModule
     {
      public Rewrite()
      {
       //
       // TODO: 在此处添加构造函数逻辑
       //
      }
      IHttpModule 成员#region IHttpModule 成员  public void Init(HttpApplication context) {
       // TODO:  添加 Rewrite.Init 实现
       context.BeginRequest +=new EventHandler(context_BeginRequest);
      }  public void Dispose() {
       // TODO:  添加 Rewrite.Dispose 实现
      }  #endregion  private void context_BeginRequest(object sender, EventArgs e) {
       HttpApplication app = (HttpApplication)sender;
       app.Context.RewritePath("your url");//aa.aspx
      }
     }
    }
      

  7.   

    URL的重写的伪静态页 
    只需要在Global.asax.cs 的加上Application_BeginRequest
      protected void Application_BeginRequest(Object sender, EventArgs e)
      {
       string oldUrl = HttpContext.Current.Request.RawUrl ;
       string pattern = @"^(.+)default/(\d+)\.shtml(\?.*)*$";
       string replace = "$1default.aspx?id=$2";
       if(Regex.IsMatch(oldUrl, pattern, RegexOptions.IgnoreCase | RegexOptions.Compiled))
       {
        string newUrl = Regex.Replace(oldUrl, pattern, replace, RegexOptions.Compiled | RegexOptions.IgnoreCase);
        this.Context.RewritePath(newUrl);
       }
      }
     
    然后在IIS中修改Shtml的映射
    c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll
    去掉检查文件是否存在的选择
     
    实现:
    default.aspx?id=123
    重写为
    default/123.shtml
      

  8.   

    使用 MVC 模式 (Model-View-Controler)
      

  9.   

    等待demo 结贴闪人了、明天结贴、
      

  10.   

    ISAPI URL 重写
      

  11.   

    UrlRewrite URL重写示例
      

  12.   

    <a href="http://www.cloth114.com">昨天刚解决,看看这里,希望能给大家一个借鉴</a>