2
votes
2answers
47 views

Razor file name with a dash

I need my page names to have a dash in the name. E.G our-vision I'm new to MVC & c# so I may be going about all this wrong. Here is my controller: public class HomeController : Controller ...
0
votes
2answers
63 views

Access asp.net mvc controller ActionResult

i want to access action result in controller(my controlelr is HotelController action is Index) (http://localhost:9001/Hotel/Index) it gives below error The resource cannot be found. Description: ...
0
votes
1answer
157 views

Routing does not find my ActionResult method

I created a ErrorController with Http400To404 ActionResult for my MVC3 application. The Route tester matches the specific route. Nonetheless, I get an error that says: "A public action method ...
0
votes
0answers
11 views

Call to Url.RouteUrl not working on deployed website

In an ASP MVC3 project a call to:- <h2><a href="@Url.RouteUrl("_ScientificPrograms", new { idProgramaSeleccionado = @programa.Id, nombrePrograma = @programa.NombreProgramaUrl(), ...
0
votes
1answer
69 views

How to remove ? and = from MVC url

Hi this my ActionLink @foreach (var item in Model) { <div> <h3> @Html.ActionLink(item.Title, "Post", new { postId = item.Id, postSlug = ...
-2
votes
1answer
52 views

Strange behavior of the application

I started a new project with VS2010, but I'm finding some strange behavior of this project are: I have the controller X, and in doing: http://localhost/DataBase/ is giving "the resource can not be ...
1
vote
2answers
180 views

Is it possible to get the controller and the action (NOT THEIR NAME!!) based on the url?

I have found a dozens of threads about getting the name of the controller and method based on the url, I managed that just as well. Can I get the MethodInfo of the method based on their name ...
1
vote
2answers
67 views

ASP.NET MVC: Routing errors on test server

I'm developing a ASP.NET MVC3 website for the 1st time. On my development machine everything works fine. I bin deployed everything on our test machine. After some missing DLL issues the website ...
0
votes
2answers
65 views

ASP.NET MVC Areas - ActionLink and RedirectToAction

While using Areas in ASP.NET MVC 3 project, I stumbled across this problem to do with ActionLink and RedirectToAction method. I added the following code in the AccountController which is at the Root ...
0
votes
1answer
95 views

ASP .NET MVC 3 same route for multiple actions based on criteria

Is it possible in ASP .NET MVC 3+ to have one same route for multiple actions based on specific state ? For instance, on LinkedIn or some similar sites, same route http://site-domain/home is used ...
0
votes
1answer
16 views

How to get action from which have been redirected?

Is there a way to get the name of the action from which I have been redirected inside a controller in ASP.NET MVC3? (By the way, without saving the name of the action in TempData nor Session)
0
votes
2answers
37 views

Mvc route is not taking default values

I have two routes routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = ...
3
votes
1answer
59 views

Using url values as variables in route values

I want to declare multiple versions of an API inside different controllers in ASP.NET MVC. Is it possible to do something like this? routes.MapRoute( "Default", // Route name ...
0
votes
1answer
44 views

How to make url's friendly with asp mvc routing?

I am using asp mvc3.I want to learn how to make my Urls friendly. this is my repository layer: public Section GetBySectionId(int sectionId) { return ...
0
votes
1answer
43 views

MVC routing issue which I can't find a solution

I have an Area called User. Under that area I have a view called Index. Area Registration with only one route: public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( ...
0
votes
1answer
125 views

ASP.NET MVC 4 Override Controller Name

Is it possible to override the controller name in ASP.NET MVC 4? It's needed for routing. There is [ActionName("some-action-name")] attribute to override the action name. Is it possible to do the ...
4
votes
3answers
5k views

ASP.NET MVC3 - How to serve View() from another controller

So in order accomplish what I asked in this post I did the following: [iPhone] [ActionName("Index")] public ActionResult IndexIPhone() { return new ...
0
votes
1answer
74 views

Can i use RouteLink to change the parameter of the route depending on link clicked, MVC3

In Global.asax.cs routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Menu", ...
0
votes
1answer
316 views

MVC3 Routing question

I just started to use the routes in MVC3 and I am totally confused. I hope I can get some advice on how I can do what I need from this site. Here is what I would like to do. First and most important I ...
2
votes
3answers
483 views

Http redirect in MVC3 .NET

So I have my site running in production and intermittently (yeah, uhoh)... these redirects don't seem to be happening public ActionResult Create() { string newuserid = BizLayer.CreateUser(); ...
5
votes
1answer
3k views

MVC3 RESTful API Routing & Http Verb Handling

I want to build a RESTful Json Api for my MVC3 application. I need help with handling multiple Http Verbs for the manipulation of a single object instance. What I've read/studied/tried MVC ...
2
votes
2answers
932 views

Passing an array to RouteValues and have it render model binder-friendly url

When passing a RouteValueDicitonary or anonymous object into a @Url.Action method (or any of its analogs), is there a way to properly pass in a collection object or IEnumerable so that it would ...
3
votes
3answers
704 views

%20 followed by slash followed by more data causes ASP.NET MVC 3 routing to fail?

When the characters %20 appears in between paramaters a url, my MVC routing stops considering that a string. Why is that, and how can I approach handling "%20" characters in my URL? Example URL ...
1
vote
1answer
84 views

MVC3 Routes with Different Parameter Types

I am struggling to get my head around routing in MVC3. Previously I have generally just avoided the whole area and stuck with ugly old ?id=1&foo=bar type urls. Not nice. I have 4 routes defined ...
1
vote
2answers
128 views

Id in the beginning of the Route in MVC

I have a situation where I want a route in my application so that the application's index method can recognize this http://www.website.com/ID and also, http://www.website.com/Controller/Action should ...
1
vote
2answers
52 views

Is it safe to use DateTime.Now as a default route value in ASP.NET MVC?

I have the following in an Area Registration of my ASP.NET MVC 3 project running on .NET Framework v4.0: context.MapRoute(null, "YardJob/{location}/{from}", new { ...
0
votes
1answer
73 views

MVC 3 exception: The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.Web.Mvc

My application seems to run fine, but I keep getting these exceptions in log4net logs: The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for ...
21
votes
1answer
5k views

ASP.NET MVC Areas with shared layout

I have defined an area (Admin) in my ASP.NET MVC 3 application, created _ViewStart.cshtml in that area and addedLayout = "~/Views/Shared/_Layout.cshtml"; to it to have a unified site layout. I also ...
4
votes
1answer
897 views

ASP.NET MVC Routing , Html.BeginForm

<% using (Html.BeginForm("SearchByZip", "Dealer", new { zip = ""}, FormMethod.Get)) { %> <div> <input type="text" class="padLeft" name="Zip" id="Zip" style="width: 200px" /> ...
2
votes
1answer
952 views

ASP.NET MVC 3 route issues

I'm working on the http://mvcforum.codeplex.com project. We have 2 areas, Forum and ForumAdmin. I have a few named routes, to make a nice URL with forum/topic titles in the URL: ...
0
votes
1answer
207 views

asp.net mvc routing rules

I have the following routes defined in an asp.net mvc project //Products/Category/SubCategory/Page routes.MapRoute( "ProductCategoryTypePaging", ...
1
vote
5answers
358 views

Asp.net MVC SEO Friendly URL

I want to implement a seo friendly url for my asp.net mvc website. currenty i have a url like http://www.domain.com/product?id=productid but no i want to rewrite my url like ...
0
votes
0answers
117 views

MVC route in Chrome has extra question mark at end of route…why?

I have a MVC route that, in IE and Firefox, shows up as http://{site}.com/{value}/, which is the proper format I am expecting. However, that same route in Chrome will have an extra question mark at ...
21
votes
4answers
6k views

jQuery Mobile/MVC: Getting the browser URL to change with RedirectToAction

My first post... When I use RedirectToAction the url in the browser doesn't change. How can I achieve this? I'm switching over to ASP.NET MVC 3.0 (also using jQuery Mobile) after 10+ years using web ...
1
vote
1answer
313 views

Mvc 3 redirecting routes behaving weirdly

I have been trying to solve this problem for a couple of days now with no success. The case is i have rewritten an old web forms site to mvc 3 and have a bunch of legacy url:s that need to be ...
2
votes
2answers
40 views

Is this good way to handle page content view when user is not authenticated

When I run my asp mvc site first page that user see is Index from HomeController. http://localhost:50975/ On that page displayed data belong only to that user. When I logout user I want to my URL ...
0
votes
0answers
61 views

routing with just one of two parameters of controller

I have an actionresult with two parameter: public ActionResult Index(int a,string b) { //some code return View(b); } it creates this url automatically: ...
1
vote
1answer
1k views

Flexible dynamic routing for MVC 3 Multi-tenant architecture

I want to create a multitenant web site where each tenant can create multiple portals similar to what Dotnetnuke does. I want to provide a flexible dynamic routing (that can take effect at ...
0
votes
2answers
63 views

MVC3 Url Routing issue

I am trying to register a route as follows : routes.MapRoute( "SaleReport", // Route name "SaleReport/GetDataConsolidated/{type}", new { controller = "SaleReport", ...
0
votes
1answer
42 views

How to change routing in asp.net mvc3

I have few images please have a look Controller Name Action Name with paramteres Routing I Just show image to clearify the names of controller and action etc etc . Now at current ...
0
votes
0answers
51 views

Encoding whole request string except domain name

This is not really an issue, but rather a thinking homework for anyone who is interested. I have an MVC app and i would like to do this: let us assume i have this request URL: ...
0
votes
2answers
133 views

MVC 3 Domain Routing

I would like to know if the following is possible. I have a website called www.myweb.com. This website could be a directory of say football teams. The list of teams could be found here ...
8
votes
4answers
2k views

Infinite URL Parameters for ASP.NET MVC Route

I need an implementation where I can get infinite parameters on my ASP.NET Controller. It will be better if I give you an example : Let's assume that I will have following urls : ...
0
votes
2answers
76 views

Incorrect redirect between action

I'm having some problems when the user wants to move to action games between domains. Organized at the local version of this: mysite.com/subdomain1/webpage/show?url=about ...
0
votes
3answers
67 views

How to do 301 Redirect from non-slashed root to slashed root domain on ASP.NET MVC 4

ASP.NET MVC 4 website that has the domain http://mosaically.com and http://mosaically.com/ and both of them are returning 200 OK response. I want mosaically.com to do 301 redirect to mosaically.com/ ...
0
votes
1answer
97 views

MVC Route Error Handler

I want to catch the latest unhandled error application and redirect it to error page whenever error has occurred. But I got error "No matching route found for RedirectToRoute." What's the problem with ...
1
vote
3answers
970 views

ASP.NET MVC 3 Case Sensitive URLs

I am doing a bad thing here. I am asking a question without trying out first by hopping that someone knows an easy way of doing this. Any chance we can make ASP.NET MVC Routing system case sensitive? ...
0
votes
2answers
148 views

Can I create an ASP MVC route that only accepts uppercase in the URL?

I have the following route: context.MapRoute( "content", "{page}/{title}", new { controller = "Server", action = "Index" }, new { page = @"^[AFL][0-9A-Z]{4}$" } ); This route is ...
2
votes
1answer
33 views

Find out the name of the controller and action before the request is serviced

I want to intercept every request coming into my MVC app after the ControllerName and Action have been resolved, but before the request is serviced, i.e. before it reaches the appropriate action. I ...
0
votes
2answers
49 views

How could I route to the /Home/Index action regardless of the URL?

I am looking for a way to route all traffic to my Home controller and to the Index action, regardless of the URL they use to arrive at my site. As long as they are using www.MyDomain.com, a user ...

1 2 3 4 5 12
15 30 50 per page