locked
MVC3 select list item RRS feed

  • Question

  • Hi, I'm so new at web development that the green paint is not yet dry.

    I have a view with a drop down list of products. How do I setup an action link to display this selected item?

    @using (Html.BeginForm("Index", "Home", FormMethod.Post, new { id = "ProductsForm" }))
    {
      @Html.Label("Select product ")
      @Html.DropDownList("ProductID", (SelectList)ViewBag.Products, "--Select One--") 
    } 
    Many thanks,

    Jonathan

    • Moved by Mike Danes Friday, January 4, 2013 8:52 AM ASP.NET related (From:Visual C# )
    Friday, January 4, 2013 12:32 AM

All replies