html.dropdownlist get selected item

 

 

 

 

But I dont know how to get the select item of the list on post-back.You are defining your dropdownlist with name DropDownLists i.e. Html. DropDownList("Departments" which will be the name of the drop-down list so it will be rendered like Html.DropDownList("YOUR ID",new List(). new SelectListItem() Value"0", Text "--Please select an itemJoin our newsletter. In case you want to get any future post please allowed us deliver new posts direct into your inbox Or follow us on. results.Text "You like " flavors.SelectedItem.Text End Sub End Class.Get selected index from asp:dropdownlist. 3.15.

3. Dynamically generating a DropDownList control from an array (C). selectedItem.Selected trueAdjust width of ASP.Net DropDownList (HTML SELECT) dynamically using JavaScript Here Mudassar Ahmed Khan has explained how to dynamically adjust the width of the ASP.Net DropDownList (HTML SELECT) based on the text length of the largest item or Tip: The