0

I have a simple html form. The built-in HTML helpers are rendering. The markup is not created. What am I missing?

<asp:Content ID="Content5" ContentPlaceHolderID="IslandPlaceHolder" runat="server">
<%using (Html.BeginForm()){%>

    <div id="manifest">Manifest Option: <%Html.DropDownList("docid",ViewData["manifests"] as SelectList);%></div>
    <div id="release">Release Version: <%Html.TextBox("release"); %></div>
    <div id="locale">Localization: <%Html.DropDownList("localization"); %></div>
    <div id="label">Label: <%Html.DropDownList("label"); %></div>
    <div id="session">Session ID (optional): <%Html.TextBox("sessionInput"); %></div>%>
    <input type="submit" value="Build" />


  <%}%>
</asp:Content>
1

1 Answer 1

5

You need to change <% to <%= to output the markup. Right now it is making the call, but doing nothing with the returned string.

You'll also need to remove the semicolon at the end of the method calls.

<%= Html.DropDownList("docid",ViewData["manifests"] as SelectList) %>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.