开发者

Asp.Net Routing to a generic handler

I Have a generic handler that's serving member logo images:

http://site.com/logo.ashx?memberid=123

Now, I want to use it by caling a url like:

http://site.com/logo/john.jpg

So I would create a route for that (pattern: "log开发者_如何学编程o/{username}.jpg"). But, my problem is - how do I retrieve {username} when inside ProcessRequest() of my generic handler? It's not a page, so I can't get Page.RouteData.Values.

Any ideas?

Thank you, Andrey


I found this good post that answered my question: http://petesdotnet.blogspot.com/2009/09/generic-handlers-and-aspnet-routing.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜