URL路由问题asp.net/C# [英] URL Routing problem asp.net/C#
问题描述
嗨亲爱的朋友们,我是编程方面的新手,我在网址路由方面遇到了一些问题...
实际上我已经在我的网络应用程序中完成了网址重写和网址路由,每个人都认为工作正常但我遇到的一个问题是......
hi Dear friends I am new in programming and I am facing some issues in url routing...
actually I have done url rewriting and url routing in my web application and every think is working fine but a problem which i am facing is that...
routes.MapPageRoute("companyPanel", "company", "~/companyPanel.aspx");
routes.MapPageRoute("CustomerDetails", "Details/{propertyid}", "~/AdDetails.aspx");
以上语法当我打开公司页面时工作正常且网址看起来像这样 http:// localhost:10852 /详细信息 [ ^ ] / 33当我转到详细页面时,我也会在网址中传递值 http :// localhost:10852 / Details / 33 [ ^ ]
,我再次进入详细页面而不是网址看起来像这样 http:// localhost:10852 / Details / company [ ^ ]但它应该是这样的 http:// localhost:10852 / company [ ^ ]......
删除了val是但是上一页仍然存在于url中,请告诉我如何删除以前的名称....请帮助我...... :(
in above syntax when i open company page its working fine and url is looking like this "http://localhost:10852/Details[^]/33" and when i go to detail page i am also passing value in url like this "http://localhost:10852/Details/33[^]"
and when again i go to detail page than url looks like thisn "http://localhost:10852/Details/company[^]" but it should be like this"http://localhost:10852/company[^]"...
it removed value but previous page is still present in url kindly tell me how can i remove previous name....kindly help me.... :(
推荐答案
请参考to: https://msdn.microsoft.com/en-us/library/cc668177.aspx [ ^ ]
如何为Web表单应用添加路由
Please refer to: https://msdn.microsoft.com/en-us/library/cc668177.aspx[^]
how to add routes for Web Form Application
这篇关于URL路由问题asp.net/C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!