在webconfig里我是这样配置的
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections>
<RewriterConfig>
<Rules>
<!-- Rules for Blog Content Displayer --> <RewriterRule>
<LookFor> ~/modify/(.[0-9]*)\.aspx </LookFor>
<SendTo> ~/modify/modifyOrders.aspx?ORDERS_ID=$1 </SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Forms"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"
/>
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
</system.web> <appSettings>
<add key="SQLConnection" value="uid=sa;pwd=sa;server=127.0.0.1;database=CpmmUserDB"/>
<add key="Service.WebMethod" value="http://localhost/CPMM_LEVEL2/WebMethod.asmx"/>
</appSettings>
</configuration>
然后在搜索页面上,我是这样写的
<a href=\"../modify/"+dsORDER_INFO.Tables[0].Rows[i][0]+".aspx\">修</a>最后我浏览页面点修,但页面不会URL重写,请大家帮忙!!
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections>
<RewriterConfig>
<Rules>
<!-- Rules for Blog Content Displayer --> <RewriterRule>
<LookFor> ~/modify/(.[0-9]*)\.aspx </LookFor>
<SendTo> ~/modify/modifyOrders.aspx?ORDERS_ID=$1 </SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Forms"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"
/>
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
</system.web> <appSettings>
<add key="SQLConnection" value="uid=sa;pwd=sa;server=127.0.0.1;database=CpmmUserDB"/>
<add key="Service.WebMethod" value="http://localhost/CPMM_LEVEL2/WebMethod.asmx"/>
</appSettings>
</configuration>
然后在搜索页面上,我是这样写的
<a href=\"../modify/"+dsORDER_INFO.Tables[0].Rows[i][0]+".aspx\">修</a>最后我浏览页面点修,但页面不会URL重写,请大家帮忙!!
解决方案 »
- 在MVC框架中如何捕获自定义事件?
- 改变图片宽度后再上传的问题
- 为什么打开水晶报表会出现登录页面?
- 控件之間的距離怎麽動態縮短?
- 如何区分sql2000与sql2005的配置连接区别
- 关于asp.net ajax 的问题
- 请教一个asp结合asp.net 发布的问题,想了几天没想出来,谢谢
- matlab r2008a和vs2003混合编程出了个问题
- Request.Files.count 首次运行页面为零,提交后再次运行正常
- 那里有asp.net meun 的控件下载啊??http://www.aspnetmenu.com/的要注册码
- 【开发环境】windows认证----.NET2.0---SQL SERVER2000的问题。
- 一个简单的xml问题?
??应该浏览器地址中显示"../modify/"+dsORDER_INFO.Tables[0].Rows[i][0]+".aspx
而实际页面为~/modify/modifyOrders.aspx?ORDERS_ID=$1吧
如
modify/1.aspx modify/modifyOrders.aspx?ORDERS_ID=$1
modify/2.aspx modify/modifyOrders.aspx?ORDERS_ID=$2
问题说的不是很清楚,重写就是你访问~/modify/(.[0-9]*)\.aspx ,会显示 ~/modify/modifyOrders.aspx?ORDERS_ID=$1页的内容,而不是你访问后者转向到后者。
<add url="~/modify/1.aspx " mappedUrl="~/modify/modifyOrders.aspx?ORDERS_ID=$1
" />
<add url="~/modify/1.aspx " mappedUrl="~/modify/modifyOrders.aspx?ORDERS_ID=$2
" />
</urlMappings>
功能太差
百度一下,网上有配置详解