ResolveUrl() without Page(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 8 months ago

If you're writing generic non-Page code in handlers, modules or other system components for ASP.NET you might find that at times you need to use ResolveUrl(), only to find that this functionality is not available outside of the Control class. Here's a generic routine, and another variation that can return a fully qualified absolute path using the familiar ~ syntax outside of the Page framework.

2 comments |category: |Views: 159

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by RobChappelRobChappel(2720) 4 years, 8 months ago 0

The comments in the article link to a better solution. Virtual path utility - http://msdn2.microsoft.com/en-us/library/system.web.virtualpathutility_methods.aspx

Reply

posted by cdjacocdjaco(5) 4 years, 8 months ago 0

And NOW I see the value in being able to rate other DNKers comments....+1 to Rob.

Reply

information Login or create an account to comment on this story