zoukankan      html  css  js  c++  java
  • 如何:对 Web 窗体使用路由

    配置用于路由的 ASP.NET 网站项目

    1. 在应用程序的 Web.config 文件中,将 ASP.NET 路由程序集添加到 assemblies 元素,如下面的示例所示:

    <add assembly="System.Web.Routing, Version=3.5.0.0, 
      Culture=neutral, 
      PublicKeyToken=31BF3856AD364E35"/>

    2. 如果应用程序在 IIS 6.0 或 IIS 7.0 经典模型下运行,则将 UrlRoutingModule 类添加到 httpModules 元素,如下面的示例所示:
    <httpModules>
      <add name="UrlRoutingModule" 
           type="System.Web.Routing.UrlRoutingModule, 
                 System.Web.Routing, 
                 Version=3.5.0.0, 
                 Culture=neutral, 
                 PublicKeyToken=31BF3856AD364E35"/>
    </httpModules>

    3. 如果应用程序在 IIS 7.0 集成模式下运行,则将 UrlRoutingModule 类添加到 modules 元素,如下面的示例所示:
    <system.webServer>
      <modules>
        <remove name="UrlRoutingModule" />
        <add name="UrlRoutingModule" 
             type="System.Web.Routing.UrlRoutingModule, 
                   System.Web.Routing, 
                   Version=3.5.0.0, 
                   Culture=neutral, 
                   PublicKeyToken=31BF3856AD364E35"/>
      </modules>
    </system.webServer>

    4. 如果应用程序在 IIS 7.0 集成模式下运行,则将 UrlRoutingHandler 类添加到 handlers 元素,如下面的示例所示:
    <system.webServer>
      <handlers>
        <add name="UrlRoutingHandler" 
             preCondition="integratedMode" 
             verb="*" 
             path="UrlRouting.axd" 
             type="System.Web.HttpForbiddenHandler, 
                   System.Web, Version=2.0.0.0, 
                   Culture=neutral, 
                   PublicKeyToken=b03f5f7f11d50a3a" />
      </handlers>
    </system.webServer>

    原文:https://msdn.microsoft.com/zh-cn/library/cc668202(v=vs.100).aspx
     
  • 相关阅读:
    TestNG之Factory
    Selenium2怎么调用selenium1中方法
    JAVA如何随机生成一个汉字
    selenium如何随机选取省份和城市的下拉框的值
    Bootstrap之登陆页面范例
    Bootstrap之信息记录
    Bootstrap之表格、表单应用
    Bootstrap之响应式导航栏
    Bootstrap之网格类
    使用fastjson将对象和字符串进行转换
  • 原文地址:https://www.cnblogs.com/youmingkuang/p/4645888.html
Copyright © 2011-2022 走看看