1.使用serever.Excute
 StreamWriter sw = new StreamWriter(Server.MapPath("html/Login.html"), false);
            Server.Execute("ShowColumn.aspx?id=1&page=2", sw);
            sw.Close();
2.替换字符

url重写
1.定义重写规则
urls.xml 变成urls.config
<?xml version="1.0" encoding="utf-8" ?>
<Urls>
  <rewrite name="ShowArticle" pattern="article-(\d+).html" path ="article-{0}.html" page="showarticle.aspx" query="id=$1"></rewrite>
  <rewrite name="ShowList" pattern="list-(\d+).html" path ="list-{0}.html" page="showlist.aspx" query="id=$1"></rewrite>
</Urls>

2.创建一个简单的实体urls类
3.urls类 获取urls.config文件中的所有url
4.httpmodule类处理 请求的地址
5.在web.config httpmodule节点添加

相关文章:

  • 2021-09-30
  • 2022-03-05
  • 2021-05-27
  • 2022-03-06
  • 2021-12-07
  • 2022-02-06
  • 2021-08-12
猜你喜欢
  • 2021-07-15
  • 2022-12-23
  • 2021-06-15
  • 2021-12-10
相关资源
相似解决方案