1

Is there a built in method to handle urls like Default.aspx/mycontent or do I need to handle it myself by taking the url and stripping of the file's path?

I have tried searching for it but haven't been able to find anything.

I'd like to handle .aspx/parameters and am not looking at Mod/URL Rewrite.

1
  • Not looking at mod-rewrite as its not easily available on shared web hosting Commented Mar 14, 2009 at 20:53

4 Answers 4

1

You could either write an url rewrite handler, use ASP.NET MVC routing in your webforms application, or use ASP.NET MVC instead of webforms.

Sign up to request clarification or add additional context in comments.

Comments

0

Take a look at ASP.NET MVC. This framework obviously goes far beyond just "user-friendly" URLs, but it does also handle this as a byproduct.

Or you could just write a HttpFilter...

2 Comments

I have read about Asp.Net MVC but its difficult changing my development model altogether and switch to Asp.net MVC.
Understandable, whereas an HttpFilter makes it much easier, and can be completely transparent (though not completely trivial).
0

If you want you're app to do "friendly urls" then surely you would want to avoid ".aspx" appearing in the URL? Have considered ASP.NET-MVC or at least the routing elements of it.

Comments

0

You can parse out the appended "folder" using the Request.Url.Segments Array:

this.Response.Write(this.Request.Url.Segments[this.Request.Url.Segments.Length - 1]);

Then use Server.Transfer or render whatever you like. You will often have problems with relative paths and such for CSS and the like.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.