4

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: "logo/{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

Andrey
  • 20,487
  • 26
  • 108
  • 176

1 Answers1

4

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

Andrey
  • 20,487
  • 26
  • 108
  • 176
  • Thanks for post the answer! – RokumDev Nov 27 '15 at 21:13
  • This link may be helpful but it would be best if you'd copy/paraphrase the relevant information here. External links should supplement an answer which can stand on its own. – canon Nov 04 '16 at 13:54