I need to get the value of my @Html.DropdownList for adding a condition by its value. But I don't know how can I get that. What should I do? Here's my code. help me for this...
@using (Html.BeginForm("Index", "Search", routeValues, FormMethod.Get, new RouteValueDictionary { { "class", "search-form" } })) {
<fieldset>
@Html.DropDownList("q",new List<SelectListItem>
{
new SelectListItem {Text ="تور",Value="تور"},
new SelectListItem {Text ="ویزا",Value="ویزا"},
new SelectListItem {Text ="اقامت گاه",Value="اقامت گاه"},
new SelectListItem {Text ="مولتی",Value="مولتی"},
},"یک گزینه را انتخاب کنید")
@Html.DropDownList("secq",new List<SelectListItem>
{
new SelectListItem {Text ="انگلستان",Value="انگلستان"},
new SelectListItem {Text ="ژاپن",Value="ژاپن"},
new SelectListItem {Text ="روسیه",Value="روسیه"},
new SelectListItem {Text ="کانادا",Value="کانادا"},
new SelectListItem {Text ="کنیا",Value="کنیا"},
new SelectListItem {Text ="سافاری",Value="سافاری"},
new SelectListItem {Text ="ده روزه",Value="ده روزه"},
},"یک گزینه را انتخاب کنید")
@Html.Hidden("culture", WorkContext.CurrentCulture)
<button type="submit">@T("Search")</button>
</fieldset>
}
Thank you