• Not Answered

How to redirect to URL passing a model?

My controller looks like this:

        public ActionResult Upload(HttpPostedFileBase file)
            var response=DoUpload(file);
            if (response.InError)
                //do something
                var model = response.CsvHeaders;    
            return View("MyPath", model);

The client uploads to sitecore a csv file, sitecore uploads it to my custom WebAPI which saves it and returns the csv headers, i want to put those headers in a model and pass it to a view.

Obviously if i do like this i get a bare bone page with no layout, no css and a url like "/api/sitecore/MyController/Upload".


I could split the request to my webapi in 2 requests, the first to upload the file and the second to get the csv headers (the second would be called directly from a controller rendering) but it doesnt look so handy to me.


Is there a way to get a regular page with layout css and a url like "/my-item/my-item/" without splitting the request to webapi in 2 requests?



Sorry in advance for my bad english and for being a newbie in sitecore