再次开贴,关于网址重写,我下载了M$的URLRewrite的例子,可运行后网址并没有重写? 我下载了M$的URLRewrite的例子回来,运行时它的根目录下有一个default.aspx文件,输入1后提交却不能重写URL,出现是:http://localhost/RewriterTester/ListProductsByCategory.aspx? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 要用ActionLessForm,在MS的示例中有个ActionLessForm的示例阿!你看看那个怎么用! 在web.config中配置对,就可以了 重写所涉及到的东西并不很多,基本的把config文件配置好,引入URLRewrite.dll就可以了!如仍有问题,贴出代码看看! 引入URLRewrite.dll相应代码web.config<?xml version="1.0" encoding="gb2312" ?><configuration><configSections> <section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" /></configSections> <RewriterConfig> <Rules> <RewriterRule> <LookFor>~/Sell/(.[0-9]*)\.html</LookFor> <SendTo>~/Search/Search_Sell.aspx?id=$1</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/Sell/Search_Sell\.aspx</LookFor> <SendTo>~/Search/Search_Sell.aspx</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/Buy/(.[0-9]*)\.html</LookFor> <SendTo>~/Search/Search_Buy.aspx?id=$1</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/Buys/(.[0-9]*)\.html</LookFor> <SendTo>~/Buys/Show.aspx?id=$1</SendTo> </RewriterRule> </Rules> </RewriterConfig> <system.web> <httpModules> <add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter" /></httpModules>............._________________________________我浏览的路径http://localhost/Url/Search/Search_Sell.aspx有web.config设置得知,我想路径应为,但不是。http://localhost/Url/Sell/Search_Sell\.aspx 第三方工具ISAPI_Rewrite比MS的好用 webservice返回XML GridView分页后跳转其他页面进行操作后,仍返回到当前页码? 如何在前台写判断 大家教教我如果作上传文件到数据库的方法啊 初学求助, 关于数据库select语句中top后面的数字能不能是个输入参数的问题 用vs2005遇到的一点小小的问题~ detailview可以实现鼠标经过变色的效果吗?应该这么样实现~? 再开新贴:怎么调用数据库连接(vb)? 如何对字符串进行解密? 哪里有 ASP.net 的学习资料,最好要 chm 的 ,哪个大侠给我一份吧。 怎样将一个数组中的数据加到dataset中
相应代码web.config
<?xml version="1.0" encoding="gb2312" ?>
<configuration><configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/Sell/(.[0-9]*)\.html</LookFor>
<SendTo>~/Search/Search_Sell.aspx?id=$1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Sell/Search_Sell\.aspx</LookFor>
<SendTo>~/Search/Search_Sell.aspx</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Buy/(.[0-9]*)\.html</LookFor>
<SendTo>~/Search/Search_Buy.aspx?id=$1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Buys/(.[0-9]*)\.html</LookFor>
<SendTo>~/Buys/Show.aspx?id=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<system.web>
<httpModules>
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter" />
</httpModules>
.............
_________________________________
我浏览的路径
http://localhost/Url/Search/Search_Sell.aspx
有web.config设置得知,我想路径应为,但不是。
http://localhost/Url/Sell/Search_Sell\.aspx
比MS的好用