Can somebody give me an sample code to retreive the item from html.dropdownlist?
views:
714answers:
1
A:
Suppose that you have this DropDown in the view:
<p><label for="ProductType">Product Type:</label>
<br /><%=Html.DropDownList("ProductTypeDropDown",
New SelectList(ViewData("ProductTypes"),
"ProductTypeID", "Name"))%>
</p>
You can simple retrieve the selected value in the controller using
Product.ProductType = form("ProductTypeDropDown")
Eduardo Molteni
2009-05-25 21:36:06
I am really sorry for not being clear. Anyways, i want the code to retrieve at the controller side.
2009-05-28 09:48:19
umm...I've posted the view and the control side just in case. Did you solved the problem or do you need further assistance?
Eduardo Molteni
2009-05-28 11:33:22