1

I have successfully integrated an MVC area into my web application project.

I would like to create a menu item from one of my MVC Views that links back to the web application Default.aspx. A "Home" Menu if you will.

Per: HTML.ActionLink vs Url.Action in ASP.NET Razor

I cannot actually use either the HTML.ActionLink nor the URL.Action to do anything but access controllers within the MVC project.

What would be the best way to create this menu heading?

Where I need the menu item:
Root>Areas>Folder>Views>Folder>Layout.vbhtml

To point to: Root>Default.aspx

It's quite possible I'm overlooking something quite easy, but as you can tell from my project mess, I'm relatively new to MVC unfortunately.

Thanks in Advance!

Community
  • 1
  • 1
atschaal
  • 355
  • 1
  • 14

1 Answers1

0

Simply put

<a href="~/Default.aspx">Text...</a>

in the view.

DaniCE
  • 2,412
  • 1
  • 19
  • 27
  • I thought about that. It does get me there, but I wanted it to look like the other HTML Action Links. Is that something that I just have to accomplish with CSS? – atschaal Aug 27 '14 at 13:26
  • I don't understand... when you generate an link using @Html.ActionLink(...) it generates just that anchor element. If you want to define any css class you have to code it with those "new { @class = ... }" parameters. So, yes, anyway you have to define the css. – DaniCE Aug 27 '14 at 13:32
  • You are right of course. Thank you for your help very much DaniCE. – atschaal Aug 27 '14 at 13:33