Resources cannot be found: asp.net mvc crud

Hi Team

I am having an issue with this error “resources cannot be found”. I have a controller uses httpost then a view file. When i try to run this View i get this error. What could cause this error? How do i fix it?

// POST: Edit.
        [HttpPost]
        public ActionResult Edit(Order order)
        {
            if(ModelState.IsValid)
            {
                OrderXmlDataAccess.UpdateOrder(order);
                return RedirectToAction("Index");
            }

            return View(order);
        }


// View

@model OrderApplicationXML.Models.Order

@using (Html.BeginForm("Edit", "Order", FormMethod.Post))
{
    @Html.AntiForgeryToken()

    <div class="form-group">
        @Html.LabelFor(model => model.OrderNumber)
        @Html.TextBoxFor(model => model.OrderNumber, new { @class = "form-control" })
    </div>

    <!-- Add the remaining fields for Order here -->

    <div class="form-group">
        <input type="submit" value="Save" class="btn btn-primary" />
    </div>
}

Is this a compile error or does it occur when you test the app? I will assume it happens during execution, as in resource cannot be found issue - Microsoft Q&A.

Can you post the entire error messages? For example in that other post it also says Server Error in ‘/’ Application. Is this the first time you tested the app? Do you get the error for the first page or does the home page work and the error is caused by some other page?

Yes Server Error in/Application.

Is this the first time you tested the app? Do you get the error for the first page or does the home page work and the error is caused by some other page?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.