Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

After loading a CSV file from Index.cshtml via:

@using (Ajax.BeginForm("LoadCSV", null, new AjaxOptions { HttpMethod = "POST" }, new { enctype = @"multipart/form-data" }))
{
    <input type="file" id="fuLoadCSV" name="fuLoadCSV" class="input" />
    <input type="submit" id="btnLoadCSV" />
}

I am successfully capturing the csv data and converting it to a list of User object:

[HttpPost]
public ActionResult LoadCSV(HttpPostedFileBase fuLoadCSV)
{
    string fileName = Path.GetFileName(fuLoadCSV.FileName);
    fuLoadCSV.SaveAs(Server.MapPath("~/FileUploads/" + fileName));
    List<User> list = GetUsersFromCSV(Server.MapPath("~/FileUploads/" + fileName));
    File.Delete(Server.MapPath("~/FileUploads/" + fileName));
    return PartialView(list);
}

These results are being sent to the partial view just fine. Now I want this partial view with these results to display inside a jQuery dialog. How can I make this happen? I've opened a jQuery dialog plenty of times client side from the Index view, but I have no idea how to do it from the controller.

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.