I'm having an issue adding a CMS upload section on a project. The content or text sections work fine but the image uploader kicks out this error. Can someone point me in the right direction to fix?

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:

Stack Trace: 

[InvalidOperationException: The view 'Edit' or its master was not found or no view engine supports the searched locations. The following locations were searched:

~/Views/CMSUpload/Edit.aspx
~/Views/CMSUpload/Edit.ascx
~/Views/Shared/Edit.aspx
~/Views/Shared/Edit.ascx
~/Views/CMSUpload/Edit.cshtml
~/Views/CMSUpload/Edit.vbhtml
~/Views/Shared/Edit.cshtml
~/Views/Shared/Edit.vbhtml]

namespace BiLink.Web.Controllers
{
    [ViewName("ui/HardwareStore")]
    public class HardwareStoreController : BaseController
    {
        [Route("the-hardware-store")]
        public ActionResult HardwareStore()
        {
            ViewBag.HardwareStoreCopy = webService.PageContent("/the-hardware-store/", "HardwareStoreCopy");
            ViewBag.HardwareSlider = webService.PageContent("/the-hardware-store/", "HardwareSlider");
            ViewBag.SanDiego = webService.PageContent("/the-hardware-store/", "SanDiego");
            ViewBag.Raleigh = webService.PageContent("/the-hardware-store/", "Raleigh");
            ViewBag.FutureLocation = webService.PageContent("/the-hardware-store/", "FutureLocation");
            ViewBag.ClientTestimonial = webService.PageContent("/the-hardware-store/", "ClientTestimonial");
            ViewBag.EngineerImage = webService.PageContent("/the-hardware-store/", "EngineerImage");
            ViewBag.LabImage = webService.PageContent("/the-hardware-store/", "LabImage");
            ViewBag.SliderContent = webService.PageContentList("/the-hardware-store/", null, 0).ContentList;
            ViewBag.CapabilitiesImage = webService.PageContent("/the-hardware-store/", "CapabilitiesImage");

            return View();
        }

    }
}

<div class="container-fluid">
    <div class="container">
       <div class="float-none margin-center row col-xs-12 margin-top-40">
            <div class="float-none margin-center row col-xs-10 align-center">
                <h3 class="hs-headings">LOCATIONS</h3>
            </div>   
            <div class="col-md-4 align-center">
                    @Html.Partial("_Upload", (BiLink.Model.PageContentModel)ViewBag.SanDiego)
            </div>
            <div class="col-md-4 align-center">
                    @Html.Partial("_Upload", (BiLink.Model.PageContentModel)ViewBag.Raleigh)
            </div>    
            <div class="col-md-4 align-center">
                    @Html.Partial("_Upload", (BiLink.Model.PageContentModel)ViewBag.FutureLocation)

            </div>
        </div>
    </div>
</div>

Related posts

Recent Viewed