I'm building an interactive website where instructor uploads files for his students as test cases for a their codes. I want to allow students to upload their own test cases if they like.
I'm using radio buttons to select a file and it works perfectly, but I'm not sure how can I allow students to upload a new file to a temp path and pass it to the action method in the last radio button.
This is my code so far:
 <div class="form-horizontal">
        <ul>
            @foreach (var file in Model.files)
            {
                var filename = Path.GetFileName(file);
                <li>
                    @Html.RadioButtonFor(model => model.inputPath, file, new { id = filename })
                    @filename
                </li>
            }
            <li>
                @Html.RadioButtonFor(model => model.inputPath,"Upload", new { id = "Upload" })
                Upload your own
            </li>
        </ul>
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Run" class="btn btn-default" id="approve-btn" />
                <input type="submit" value="Cancel" class="btn btn-default" data-dismiss="modal" />
            </div>
        </div>
    </div>
How can I do that?
 
     
    