asp.net-mvc,asp.net-mvc-routing,maproute
I think that you have misunderstood the concept of route definition. You cannot add dynamic behavior into rote registration process because it is executed only once on application start event. The defaults parameter is used when the routing engine does not find a appropriate parameter in the provided URL. What...
You're not passing any route values to Html.BeginForm, so your rendered form element looks like this: <form action="/ControllerName/PageName" method="get"> </form> So when you click submit, it simply appends the values of the form as a query string. To fix this: @using (Html.BeginForm("PageName", "Home", new {categoryName = "Insurance", cityName = "Irvine",...
asp.net-mvc,url-routing,routes,maproute
You can try this: protected void Application_BeginRequest(object sender, EventArgs e) { var httpContext = ((MvcApplication)sender).Context; var currentRouteData = RouteTable.Routes.GetRouteData(new HttpContextWrapper(httpContext)); if (currentRouteData.Values["slug"] != null) { Response.Write(currentRouteData.Values["slug"]); } } ...
javascript,c#-4.0,google-maps-api-3,polyline,maproute
finally i get it working using the following server and client side logic On server side i made n multiple arrays of locations belonging to each salesperson in resultset c# IList<RadComboBoxItem> Values = rcbSalesPersons.CheckedItems; string Ids = String.Join(",", rcbSalesPersons.Items.Where(i => i.Checked).Select(i => i.Value).ToList()); //List<SalespersonSpatialInfo> lstSpatialInfo = SalespersonSpatialInfo.getSpatialInfo(Ids, Session["StoreID"].ToString(), new DateTime(DateTime.Today.Year,...
vb.net,asp.net-mvc-4,html.actionlink,maproute
In your route definition the action is defined as GetOBDocument so when using Html.ActionLink you should provide that as the action name instead of CommissionPayment: <%=Html.ActionLink(linkText:=doc.DocumentName, _ actionName:="GetOBDocument", _ controllerName:="GetDocument", _ routeValues:=New With {.DocID = doc.DocumentID}, _ htmlAttributes:=Nothing) %> ...
c#,routes,odata,web-api,maproute
After a few tests I've found out that declaring MapODataServiceRoute is not enough! You need also to add MapHttpRoute also, since ODataController derives from ApiController config.Routes.MapHttpRoute( name: "Sample", routeTemplate: "{sessionId}/{controller}" ); config.MapODataServiceRoute( routeName: "HSODataRoute", routePrefix: "{sessionId}/", model: GetEdmModel()); I discovered this because after I removed MapHttpRoute, I've started to get...