Answer the question
In order to leave comments, you need to log in
How to connect selected DropDownList value to @Url.Action?
Added control to the view
@{
var listItems = new List<ListItem>
{
new ListItem { Text = "item1", Value="item1" },
new ListItem { Text = "item2", Value="item2" },
new ListItem { Text = "item3", Value="item3" }
};
}
@Html.DropDownList("ddlist", new SelectList(listItems, "Value", "Text"))
<a target="_blank" href="@Url.Action("Download", new { t = ViewData["Token"] })" class="rn-button rn-button-sm rn-button_white">
<i class="rn-icon rn-icon-download"></i>
<span class="rn-button__text">Скачать</span>
</a>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question