Click here to Skip to main content
15,890,897 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Right, so I was working on developing a website(just a beginner though). I have stuck at this issue of generating a unique url for each user who registers on my site. Now say my site is named,
www.mydomainname.com

As of now every user has a profile which has the same url, regardless of the username,
www.mydomainname.com/myaccount.aspx

This is because I extract data for every user based on his username by sql queries. Now I want to remove that myaccount.aspx and add the username of the registered user to the url. This also helps in other users visiting your profile, just like youtube or facebook i.e.
www.mydomainname.com/userid

Routing might help me(not sure though), but any ideas or sample code or even shower knowledge of how to achieve this would be of great help.
Posted

1 solution

The easiest way is to use url rewriting - see here: http://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900