asp.net-mvc-controller Questions
12
Solved
Is it possible to list the names of all controllers and their actions programmatically?
I want to implement database driven security for each controller and action. As a developer, I know all con...
Tadashi asked 5/2, 2014 at 16:46
4
Solved
RESTful conventions indicate using plural nouns over singular objects.
What is the pluralization convention for naming ASP.NET MVC controllers, i.e.
ProductController or ProductsController?
Synthiasyntonic asked 17/9, 2012 at 13:18
4
Solved
I'm working on my first real ASP.NET MVC project and I've noticed that the controller I've been working in is getting rather large. This seemingly goes against the best practice of keeping your con...
Luscious asked 28/9, 2010 at 13:14
4
Solved
I ran into a problem where I had an Html.DropDownList in my view that would postback the selected value the first time I submitted the form, but each subsequent postback would only post data from t...
Sanctimony asked 24/11, 2009 at 19:14
4
Solved
In Asp.net MVC the url structure goes like
http://example.com/{controller}/{action}/{id}
For each "controller", say http://example.com/blog, there is a BlogController.
But my {controller} porti...
Ilmenite asked 21/7, 2010 at 20:57
2
Solved
If I have 2 controller actions:
[HttpGet]
public ActionResult Login()
{
//...
return View();
}
and
[HttpPost]
public ActionResult Login(FormCollection values)
{
//...
return Redire...
Cordwainer asked 16/3, 2014 at 21:31
4
Solved
We can an MVC app that uses the default folder conventions for the HTML views, but we'd like to set up alternate "Services" folder with controllers used only for web services returning xml or json....
Monastery asked 7/12, 2010 at 1:15
5
I have a ProductsController with only one View - Index.cshtml.
The following 3 action methods are inside of this controller:
//http://localhost:55555/products
[HttpGet]
public IActionResult Inde...
Canonicate asked 19/12, 2016 at 17:43
3
Solved
...guess I'm the first to ask about this one?
Say you have the following routes, each declared on a different controller:
[HttpGet, Route("sign-up/register", Order = 1)]
[HttpGet, Route("sign-up/...
Stagy asked 28/1, 2014 at 18:59
2
Solved
I am trying all day to figure out to get the ApplicationDbContext in the ManageController.cs of a default MVC 6 project.
I went online and Googled a lot but no one seems to have the same problem a...
Coffeepot asked 20/8, 2016 at 15:24
2
Solved
I've created controller classes to assist with Role authorization.
I have a base class ControllersAuthorities, which is the highest level of authority. I have created the other classes to extend e...
Tumor asked 23/9, 2015 at 13:46
5
Solved
[ActionName("about-us")]
public ActionResult EditDetails(int id)
{
// your code
}
The above works for actions but I would like to be able to do the same (or similar) for controllers, ie have a h...
Dykes asked 12/3, 2011 at 8:19
3
I have a Controller. "OrderController". Currently it's 1800 lines. I like to reduce the size. I'm using static helper methods which is fine but i'm using ninject to call my repositories so don't ha...
Crinite asked 4/3, 2011 at 11:53
1
© 2022 - 2024 — McMap. All rights reserved.