actionmethod Questions
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
3
Solved
I am seeing the following code being applied in .net core action methods:
[HttpPost("MyAction", Name = "MyAction")]
public IActionResult MyAction()
{
// some code here
}
What is the purpose of ...
Ally asked 22/10, 2019 at 5:50
9
Solved
Can anybody please tell me why should I use the NonAction attribute? I mean say I have a form with several submit values: Update, Delete or Insert. Since all the submit buttons have the same form i...
Violaceous asked 17/6, 2011 at 12:15
4
Solved
I have been trying the whole afternoon crawling through the web trying to receive a JSON object in the action controller.
What is the correct and or easier way to go about doing it?
I have tried ...
Rolo asked 5/2, 2014 at 13:32
2
Solved
I have a method in my controller that I don't want to be called from the address bar in the browser...
Is there a way to do that? Maybe some kind of annotation, modification in the route configura...
Rositaroskes asked 22/5, 2013 at 16:26
2
Solved
I have been searching extensively on how to create a navigation link that will display an ajax Loading icon while the action method is running in MVC 3 using the Razor view engine.
While I have fou...
Malpighiaceous asked 25/10, 2013 at 16:17
5
With ASP.net MVC is it possible to POST a form to a controller action which includes parameters not in the form, but from the URL?
For example
The Action method in GroupController:
[AcceptVerbs...
Teofilateosinte asked 17/3, 2010 at 20:5
1
Solved
Is there any way to pass multiple paramters by using params keyword to an action method with GET as below?
http://.../Method/param1/param2/param3/..../paramN
Action method should be as below:
p...
Mutant asked 10/1, 2013 at 12:13
4
Solved
Possible Duplicate:
Mvc Html.ActionButton
With ASP.NET MVC 3 I know how to create a link to an action method very easily but what I'd like to know is how do you make a button (when cl...
Doelling asked 25/5, 2012 at 11:39
1
Solved
Here is the code I use when someone visits a product page on my ecommerce website.
public ActionResult Details(int id, string slug)
{
using (var productRepository = new EfProductRepository())
{
...
Sardis asked 5/4, 2012 at 15:22
3
Solved
I'm trying to implement a list of users names which can be rearranged by clicking on UP or DOWN links.
<ul>
<ui:repeat var="user" value="#{cc.attrs.value}">
<li>
#{user.name}
...
Shayshaya asked 11/1, 2012 at 19:57
1
Solved
I am building images from a byte[] like below.
public FileContentResult GetEmployeeImage(int empId)
{
MemoryStream ms = new MemoryStream(byteArray);
Image returnImage = Image.FromStream(ms);
re...
Vedis asked 10/5, 2011 at 16:9
1
Solved
When I try to use Html.Action in ASP.NET MVC 3 for a controller in a different namespace from the current controller I get an error :
Code:
@Html.Action("Foo", "Application", new { id = "FG2" })
...
Sagittate asked 11/3, 2011 at 6:34
3
I would like to take an existing action method, render its return value to a string and ship it as a JSON for a response to an AJAX request.
To do this, I need to render an ActionResult to a stri...
Paling asked 3/1, 2011 at 15:30
2
Solved
I'm looking for a way to enforce a controller's action to be accessed only via an AJAX request.
What is the best way to do this before the action method is called? I want to refactor the following...
Massotherapy asked 12/11, 2010 at 19:31
2
Solved
What are the benefits or detriments of either?
Former asked 8/8, 2010 at 12:54
3
I'm only a newcomer to ASP.NET MVC and am not sure how to achieve a certain task the "right way".
Essentially, I store the logged in userId in HttpContext.User.Identity and have written an Enhance...
Coriolanus asked 14/5, 2010 at 1:49
5
Solved
The ASP.NET MVC controller action methods are primarily used for handling 'business' operations but it can be used for lots more.
I thought it would be fun to see what creative, useful things peop...
Stead asked 28/1, 2009 at 1:2
1
© 2022 - 2024 — McMap. All rights reserved.