0

I want to view dropdown in the shared page

<div class="navbar-collapse collapse">
    <ul class="nav navbar-nav">
        <li>@Html.ActionLink("Home", "Index", "Home")</li>
        <li>@Html.ActionLink("About", "About", "Home")</li>
        <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
        <li>@Html.DropDownListFor()</li>
    </ul>
</div>

this above file name is _Layout.cshtml.
I have a table in my database named headings. in this table column as helps. I want to add a button "Helps" along with "Home", "Contact", and "About". Such that when we click on "Helps" it shows a dropdown with all the values stored in the table headings in "helps" column. How should I do it.

Iñigo
  • 1,877
  • 7
  • 25
  • 55
Asis
  • 183
  • 3
  • 15
  • this [Link](https://stackoverflow.com/questions/6088042/is-it-posible-do-have-html-actionlink-inside-a-dropdownlist-without-java-script) had the same problem with you. you can see their answer – shahed mahmoudi Feb 10 '20 at 10:07
  • this [Link](https://stackoverflow.com/questions/6088042/is-it-posible-do-have-html-actionlink-inside-a-dropdownlist-without-java-script) had the same problem with you. you can see their answer – shahed mahmoudi Feb 10 '20 at 10:08
  • nicely illustrated [here](https://forums.asp.net/t/2142681.aspx?How+to+populate+a+dropdownlist+on+Layout+Page) – Ajay Gupta Feb 10 '20 at 10:20

0 Answers0