Click here to Skip to main content
15,120,268 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I'm getting a 404 The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. every time I run my details view can anyone help me out
C#
// GET: View_Location/Details/5
       public ActionResult Details(int ID =1, string LOCATION = null, string ACTUAL_RO_LOC = null)
       {
           if (ID == null)
           {
               return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
           }
           Models.View_Location view_Location = db.View_Location.Find(ID, LOCATION, ACTUAL_RO_LOC);
           if (view_Location == null)
           {
               return HttpNotFound("Something Is Wrong !!!");
           }
           return View(view_Location);
       }

<pre lang="HTML">
 <h4>View_Location</h4>
        <hr />
        <dl class="dl-horizontal">
            <dt>
                @Html.DisplayNameFor(model =>model. ID)
            </dt>

            <dd>
                @Html.DisplayFor(model => model.ID)
            </dd>
            <dt>
                @Html.DisplayNameFor(model => model.LOCATION)
            </dt>

            <dd>
                @Html.DisplayFor(model => model.LOCATION)
            </dd>
            <dt>
                @Html.DisplayNameFor(model => model.ACTUAL_RO_LOC)
            </dt>

            <dd>
                @Html.DisplayFor(model => model.ACTUAL_RO_LOC)
            </dd>
            <dt>
                @Html.DisplayNameFor(model => model.SORT_ID)
            </dt>
    
            <dd>
                @Html.DisplayFor(model => model.SORT_ID)
            </dd>
    
            <dt>
                @Html.DisplayNameFor(model => model.ITEM_DESC)
            </dt>
    
            <dd>
                @Html.DisplayFor(model => model.ITEM_DESC)
            </dd>
</pre>
<pre lang="c#">
 public partial class View_Location
    {
        public string LOCATION { get; set; }
        public Nullable<int> SORT_ID { get; set; }
        public string ITEM_DESC { get; set; }
        public string ITEM_VALUE { get; set; }
        public int ID { get; set; }
        public string STATUS { get; set; }
        public string LEVEL { get; set; }
        public string REG_DIRECTOR { get; set; }
        public string LOC_DSC { get; set; }
        public string BUS_UNIT { get; set; }
        public string ACTUAL_RO_LOC { get; set; }
        public string PS_DEPT { get; set; }
        public string TEMPL_DSC { get; set; }
        public Nullable<decimal> J_LAT { get; set; }
        public Nullable<decimal> J_LON { get; set; }
    }
</pre>
Posted
Updated 7-Apr-15 19:18pm
v2
Comments
Code For You 8-Apr-15 0:26am
   
what is the url you are trying to hit .?
Joan Magnet 8-Apr-15 7:04am
   
Paste the code where you call .Details() function.
Samatha Reddy G 8-Apr-15 10:08am
   
what is ur view name?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900