Solved

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

Posted on 2013-10-28
1
474 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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…

752 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