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

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 ?
finance_teacherAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
käµfm³d 👽Connect With a Mentor Commented:
Use the overload that accepts the controller name to use:

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

Open in new window

0
All Courses

From novice to tech pro — start learning today.