0

I want to generate pages with asp.net. I have one page with the content I will show. I know that you can use a query string like this:

www.mysite.com/users.aspx?name=pol

With the code for read and place a query string, I have no problems and works very good.

But for the users it's more friendly to use this:

www.mysite.com/users/pol

How can you do this? I use ASP.NET, the background language is C#.

1
  • 5
    The users couldn't care less what your URL looks like, see Facebook. Anyway what you're looking for is URL routing, try to search: weblogs.asp.net/scottgu/… Commented Jun 18, 2015 at 15:04

1 Answer 1

1

You can achieve this using URL Routing.

ASP.Net web forms applications doesn't support URL routing by default, but you can easily implement it by registering routes at the start of your application (in Global.asax file) as shown here -

http://weblogs.asp.net/scottgu/url-routing-with-asp-net-4-web-forms-vs-2010-and-net-4-0-series

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

1 Comment

Can you add the most important code to your question? If the link goes offline...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.