Sunday, November 28, 2010

Razor MVC3, a file upload form

@using (Html.BeginForm("CreateStepUpload", "Pivot", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Fields</legend>

        <div class="editor-label">
            File:
        </div>
        <div class="editor-field">
            <input type="file" name="theFile" id="theFile" />
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

No comments:

Post a Comment