Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Html.ActionLink("Link Text", "ActionName", "ControllerName", new { Area = "AreaName" }, new{})
- Html.ActionLink("home", "Index", new { area = "", controller = "Home" })
- @if (Request.IsAuthenticated)
- {
- <text>
- Hello, @Html.ActionLink(User.Identity.Name, "Manage", "Account", new { area = "" }, htmlAttributes: new { @class = "username", title = "Manage" })!
- @using (Html.BeginForm("LogOff", "Account", new { area = "" }, FormMethod.Post, new { id = "logoutForm" }))
- {
- @Html.AntiForgeryToken()
- <a href="javascript:document.getElementById('logoutForm').submit()">Log off</a>
- }
- </text>
- }
- else
- {
- <ul>
- <li>@Html.ActionLink("Register", "Register", "Account", new { area = "" }, htmlAttributes: new { id = "registerLink" })</li>
- <li>@Html.ActionLink("Log in", "Login", "Account", new { area = "" }, htmlAttributes: new { id = "loginLink" })</li>
- </ul>
- }
- Html.ActionLink("Text", "ActionName", "ControllerName", new { Area = "AreaName" }, null)
- @{ var awesomeArea = new { area = "Awesome" }; }
- @Html.Action("Something", "Somewhere", awesomeArea)
- @Html.ActionLink("Stuff", "FooBar", awesomeArea)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement