Routing issues in MVC

7 comments

I had an issue when including a warningbar in admin


Diagnostic Data - Honda Website Public Services DEV
16 Dec 2013 1:00pm
Source:
System.Web.Mvc (type: System.InvalidOperationException)
Error Message:
No route in the route table matches the supplied values.
URL:
http://localhost/HondaPublicServices/Admin/BikeModel/Edit/425
User:
::1 [Beweb Office]
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
Logged In User ID: 20
Referer:
http://localhost/HondaPublicServices/admin/BikeModel/IndexNormal
Stack Trace:
ASP.areas_admin_views_bikemodel_bikemodeledit_aspx.__RenderContent1(HtmlTextWriter __w, Control parameterContainer) - Areas\Admin\Views\BikeModel\BikeModelEdit.aspx line 117
113:Primary Model Key (for Pricing):*114:115:  116: <%if(record.marketdesc.isnotblank()){> 117:>> <%=html.action("getmodelkeydropbox", new="" modelkey="record.ModelKey," marketdesc="record.MarketDesc})"> 118: <%}else{%> 119: Select market desc first, and save & refresh. 120: <%}> 121: 

Here is the admin no form master



including this line killed the other renderaction() or html.action calls on the page. Possibly because setting the warning bar broke the 'areas' from looking for routes in the root of the site, rather than the admin 'area' where the error occurred.


Here is the code that caused the above error caused by the warning bar being included in the admin(noform)master

Bike Sub Type:**<%if string="" isnullorempty="" record="" biketypeid="" tostring=""> <%=Html.Action("GetSubTypeOptions", new { BikeTypeID=record.BikeTypeID, BikeSubTypeID=record.BikeSubTypeID}) %> <%} else=""> Please select Bike Type first <%}%>  

Perhaps areas are too much trouble. There is also an issue like this when trying to include ascx user controls in admin areas but the file must reside in a common folder of the root of the site.


If you have an issue like the above, check the previous renderaction, or possibly the master to see if there are issues with that, rather than the one being reported as having the issue.


Comments


Leave a Comment