Solved

asp.net mvc -- @Html.ActionLink directory ?

Posted on 2013-10-28
1
464 Views
Last Modified: 2013-10-28
http://localhost:63802/UserRole/Index has
@Html.ActionLink("Create User", "/Account/Register", new {})
which goes to
http://localhost:63802/UserRole/Account/Register
------------------------------------------------------------------------------------
How can I change the
http://localhost:63802/UserRole/Index
code so it goes to
http://localhost:63802/Account/Register
without the "UserRole/" subdirectory ?
0
Comment
Question by:finance_teacher
1 Comment
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39605796
Use the overload that accepts the controller name to use:

@Html.ActionLink("Create User", "Register", "Account")

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now