actionresult Questions
6
MVC App, client makes request to server, error happens, want to send the msg back to the client.
Tried HttpStatusCodeResult but just returns a 404 with no message, I need the details of the error s...
Nicky asked 10/2, 2014 at 16:26
2
I have a MVC ActionResult controller that download the file.
If the file is PDF then using this JS code
var $obj = $('<object>');
$obj.attr("type", "application/pdf");
$ob...
Teryn asked 25/6, 2019 at 10:56
9
Solved
I am creating an ActionResult in ASP.Net MVC to serve images. With Session state enabled, IIS will only handle one request at a time from the same user. (This is true not just in MVC.)
Therefore,...
Sissified asked 23/9, 2009 at 6:7
2
are any alternatives for compile .scss files in action in ASP.NET MVC controller?
I have /Content folder with two files: main.scss and external.scss. In my controller I'm using NSASS package:
pu...
Rolfe asked 7/6, 2015 at 12:28
2
Solved
Take the following code using ASP.NET Core 2.1:
[HttpGet("/unresolved")]
public async Task<ActionResult<IEnumerable<UnresolvedIdentity>>> GetUnresolvedIdentities()
{
var results...
Lazare asked 8/8, 2018 at 8:55
7
Solved
In my AJAX call, I want to return a string value back to the calling page.
Should I use ActionResult or just return a string?
Stirling asked 16/2, 2009 at 17:44
3
Solved
I try to get a value from ActionResult<object> in an ASP.NET Core API method.
The API has a different controller. I try to use a method from controller B in controller A to return the resul...
Excursion asked 27/4, 2020 at 7:38
2
Solved
I am using ASP.NET MVC 4 with entity framework model first.
In my "Masterpage.cshtml" I want to have a partial view which contains a textbox and a button.
The search is looking for the items tit...
Copse asked 19/5, 2013 at 17:27
1
I have a controller method of this signature:
public async IAsyncEnumerable<MyDto> Get()
It works fine but I need to do some request validation and return 401, 400, and other codes accordi...
Roswell asked 9/3, 2020 at 11:27
4
Solved
My search functionality seems to continue in a infinite loop, everytime my debug hits the action below the POST actionresult gets fired.
In my Masterpage.cshtml I have following action:
<li&g...
Flier asked 20/5, 2013 at 21:36
1
The following method is intended to accept an Http method and url, execute the method against the url, and return the resulting response to the caller. It returns ActionResult because there are err...
Plectrum asked 23/4, 2018 at 13:53
3
Solved
I am trying to make usage of the IActionResult interface to throw specific exceptions. But at this moment I am stuck at the controller.
I've written the following code to get a single call:
[Route...
Michalemichalski asked 16/1, 2019 at 12:41
6
Solved
I have a specialised case where I wish to serve a straight html file from a Controller Action.
I want to serve it from a different folder other than the Views folder. The file is located in
Solut...
Goniometer asked 31/5, 2012 at 8:46
1
Solved
I'm Writing simple proxy application which get "URL Address" like "/xController/xMethod" and get result from another web application by HttpClient and show result.
My Method:
public ActionResult...
Desilva asked 18/10, 2018 at 6:37
4
I want to pass more then one parameter from RedirectToAction method
how can I pass?
My One Action Method
[HttpPost, ActionName("SelectQuestion")]
public ActionResult SelectQuestion(string emai...
Reduced asked 24/8, 2012 at 11:42
2
Solved
Is there a list of all the ASP.Net MVC action results and their uses?
I've been busily using ActionResult for almost everything but I know that's not correct and that I should be using more specif...
Ukulele asked 29/9, 2009 at 4:19
2
Solved
I want to download files on browser with ajax and ActionResult. The file is downloaded and returned from my ActionResult.
I see the Http query is ok and see the data in the response body. The prob...
Kapellmeister asked 27/1, 2017 at 18:53
2
Solved
I wanted to save notification in TempData and shown to user. I create extension methods for this and implement a class which Extends from ActionResult. I need to access TempData in override Execute...
Nicki asked 17/12, 2016 at 16:19
3
Solved
I would like to show an AJAX loading icon during an ActionResult request that can take a few seconds to process.
What is the best approach to accomplished this?
I only want to display the icon af...
Tai asked 24/6, 2011 at 10:35
3
Solved
File -> New Project for ASP.NET MVC projects used to generate controllers with virtual actions. I'm not sure if that stopped with MVC 2 or MVC 3, but is this no longer a best practice?
Jollify asked 4/6, 2011 at 16:52
1
I created following custom ActionResult which returns multiple partial views.
public class MultiplePartialViewsResult : ActionResult
{
private const string Separator = "-";
private PartialViewRe...
Elum asked 10/1, 2016 at 14:1
7
Solved
I am trying to provide a simple RESTful API to my ASP MVC project. I will not have control of the clients of this API, they will be passing an XML via a POST method that will contain the informatio...
Keratose asked 10/7, 2009 at 20:41
4
Solved
I need to create an ActionResult in an ASP.NET MVC application which has a .csv filetype.
I will provide a 'do not call' email list to my marketing partners and i want it to have a .csv extension ...
Heida asked 13/6, 2009 at 3:58
4
Solved
I'm using MVC 3 I would like to dynamically create a CSV file for download, but I am unsure as to the correct MVC orientated approach.
In conventional ASP.net, I would have written something like:...
Luckey asked 23/8, 2011 at 15:21
2
Solved
I am still learning to work with asp.net and I am trying to redirect to an Edit action in a controller from another controller, but I can’t find out how to make it work.
this is what I have
return...
Gerenuk asked 24/5, 2015 at 23:17
1 Next >
© 2022 - 2024 — McMap. All rights reserved.