在asp.net 3.5中的URL路由 [英] url routing in asp.net 3.5

查看:61
本文介绍了在asp.net 3.5中的URL路由的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我已经浏览了所有可以找到的博客和文章,以便掌握网址,希望找到一个简单的方法 - 遵循这种技术的例子。我没有找到太多,至少从非专家开发人员的角度来看,比如我自己。



我已经设法掌握了4个步骤:1)添加对System.Web.Routing命名空间的引用,2)在全局中注册路由程序。 asax文件,3)在web.config文件的httpModule部分添加路由模块,4)编写实现IRouteHandler接口及其GetHttpHandler函数的routehandler类。



我想知道的是如何从数据库中获取url参数的值以及如何提供动态数据作为我通常使用查询字符串参数的值?



非常感谢您的回答。

Hi,

I''ve been going through all the blogs and articles that I could find to get a grip on url routing hoping to find an easy-to-follow example of this technique. I haven''t found much, at least from a non-expert developer''s point of view, such as myself.

I''ve managed somehow to grasp 4 steps: 1) add the reference to the System.Web.Routing namespace, 2) register the routehandlers in the global.asax file, 3) add the routing module in the httpModule section of the web.config file, 4) write the routehandler class which implements the IRouteHandler interface and its GetHttpHandler function.

What I''d like to know is how I can get at the values of the url parameters from database and how I can provide dynamic data as values as I normally would using query string parameters?

Thank you so much for any answers.

推荐答案

请参阅下面的google链接,其中包含有关codeproject.com的有用文章



网址路由 [ ^ ]



关于相同的一个重要链接是



使用ASP.NET 4.0进行URL路由 [ ^ ]



以上链接适用于4.0但你可以拥有关于如何获取参数等的想法。
Refer to below google link which contains usefull articles over codeproject.com

URL Routing[^]

One important link regarding the same is

URL Routing with ASP.NET 4.0[^]

The above link is for 4.0 but you can have ideas about how to get parameters etc.


这篇关于在asp.net 3.5中的URL路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆