personalise the link of my project in mvc
How can i change the link ok my project from http://localhost/Home/Index to http://localhost/Home/Index?UserId=2 (just an example of link). I know that it's in global.asax file, but what it's the complete configuration please ??
Ramsès Zogning IIPosted Dec 7, 2014, 11:28 AM
I am in the middle phase in dotnet MVC 4
for a learning project, I created a web application mvc 4 containing an User profile.
I want to know how to customize the Routing (if that is the term to use):
For example: When a user registers or logs, it has the following link into their browser: http: // localhost / Profile / index
I would rather this: http://localhost/Profile/Username
Where Username is the name of the current user (the one that has just authetifier).
Much like facebook. Example: https://www.facebook.com/Ramses
I know this is in the RouteConfig.cs (Global.asax) file!
I want to know how.
Is there also something to add you to my controller?
Thanks.
Saineshwar BageriPosted Dec 6, 2014, 11:42 PM