Tagged Questions
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 ...
21
votes
1answer
6k 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 ...
15
votes
3answers
778 views
How do I return a 404 status where invalid parameters are passed to my ASP.NET MVC controller?
I want to return a HTTP status 404 if invalid arguments are passed to my controller. For example if I have a controller that looks like:
public ActionResult GetAccount(int id)
{
...
}
Then I ...
13
votes
2answers
459 views
Failing ASP.NET MVC route. Is this a bug or corner case?
I have an ASP.NET MVC 3 application where users can post suggestions along the lines of "bla bla would be better if yada yada yada".
For the suggestion detail page I have defined a nice SEO friendly ...
13
votes
3answers
663 views
Possible Bug With ASP.NET MVC 3 Routing?
Normally i wouldn't put a title like this in the question, but i'm pretty sure it's a bug (or by design?)
I created a brand new ASP.NET MVC 3 Web Application.
Then i went to the /Home/About page.
...
13
votes
2answers
421 views
Unexpected route chosen while generating an outgoing url
Please, consider the following routes:
routes.MapRoute(
"route1",
"{controller}/{month}-{year}/{action}/{user}"
);
routes.MapRoute(
"route2",
"{controller}/{month}-{year}/{action}"
...
9
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 :
...
9
votes
3answers
2k views
What is routes.IgnoreRoute(“{resource}.axd/{*pathInfo}”)
What is routes.IgnoreRoute("{resource}.axd/{*pathInfo}")
I cannot find any .axd file in my project, can I remove this route rule?
9
votes
5answers
856 views
Localizing/translating routes in ASP.NET MVC
Anyone knows a nice solution to localize routes in ASP.NET MVC? What I'd like to achieve is that these two urls point to the same action/resource:
http://example.org/Products/Categories (en)
...
8
votes
2answers
3k views
Difference between Url.RouteUrl() & Url.Action() in MVC3
I am in the process of generating URL dynamically in my cshtml page.
What is the difference between Url.RouteUrl() & Url.Action()?
Which one should I use to generate the URL & what difference ...
8
votes
3answers
893 views
Performance bottleneck Url.Action - can I workaround it?
I have an application that I recently upgraded from ASP.NET MVC1 to ASP.NET MVC4 rc1.
It uses the Webforms viewengine.
It has performance issues whenever Url.Action(action,controller) is used.
I ...
7
votes
1answer
9k views
Implementing “Remember Me” Feature in ASP.NET MVC
I'm trying to implement a "remember me" feature to my login form. I am using ASP.NET MVC as my web application. I managed to get the cookie stuff working, but I failed to automatically login the user ...
7
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 ...
7
votes
1answer
7k views
Other errors find my Error.cshtml, why doesn't 404 error find Error.cshtml?
I am tackling ASP.NET, MVC 3, web development, for the first time, all at the same time. Please bear with me, as I know this subject has been discussed heavily from different angles. I still have not ...
7
votes
1answer
819 views
A public action method 'cache' was not found on controller
I am getting A public action method 'cache' was not found on controller occasionally while executing the actionresult. Although here is no cache defined or used in my code.Don't know where from it is ...