Questions tagged [actionresult]

The value returned by the Struts 2 Action class method when it completes.

The value returned by the Struts 2 Action class method when it completes. Actually, it returns a String type value. The value of the String is used to select a result element of the configuration. An action configuration will often have a set of result configurations representing different possible outcomes. A standard set of result tokens are defined by the Action interface are:

String SUCCESS = "success";
String NONE    = "none";
String ERROR   = "error";
String INPUT   = "input";
String LOGIN   = "login";

Further details are available: http://struts.apache.org/release/2.3.x/docs/result-configuration.html

457 questions
0
votes
1 answer

RedirectToAction / save form and print PDF from on button

my application is MVC3 (ASPX views). I have a form, in the Edit view I have save button, that saves the form and return to the index page, and another button to print PDF from another ActionResult in the same controller as Edit; it there a way to…
hncl
  • 2,295
  • 7
  • 63
  • 129
0
votes
1 answer

How to execute an ajax call just after a request to download a file in ASP.NET MVC3

what I want to do is to update the number of "new files" after I read one. First of all, I have a text with the quantity of files that are new (by new files I mean the ones that I havent downloaded or clicked to download yet). Plans…
Morgan Soren
  • 563
  • 4
  • 14
  • 33
0
votes
2 answers

Need to keep a URL hidden from the user, can I return the results of the HTTP request as an ActionResult?

In order to access a vendor resource (externally hosted) I have a URL that makes a request which contains authentication credentials. The URL is built dynamically, but I don't want it present in the user's browser. Instead, I'd like to build the…
MetaGuru
  • 42,847
  • 67
  • 188
  • 294
0
votes
2 answers

Getting request type from ActionResult

I am extending the ActionResult class. In the ExecuteResult method I want to check if the action was a GET or a POST however there doesn't seem property in the ControllerContext class that will let me do that. Does anybody know how to check the…
Stefan Bossbaly
  • 6,682
  • 9
  • 53
  • 82
0
votes
1 answer

ActionResult parameter null control

How can i control ActionResult null parameter?.i'm trying nullable to id but not work. CONTROLLER: public ActionResult Languages(int id) { if(id==null) { id = 0; } var query = from n in se.Languages orderby…
Pushkin
  • 63
  • 2
  • 8
0
votes
2 answers

ASP.NET-MVC3: how to get the url of an action in the controller

In an ASP.NET MVC3 application I have an Action method that returns a file for the user to download. In the HomeController: [HttpGet] public ActionResult DownloadFile() { pathToReturn = FileManager.GetPathOfFile(); return File(pathToReturn,…
Y2theZ
  • 10,162
  • 38
  • 131
  • 200
0
votes
1 answer

ViewResult fails to return values once a new parameter (not id) is used

I have a bit of a weird issue with a record display. If a user enters a bar-code numeric (int) value into a URL, I'm supposed to show the details of the record linked to that bar-code. At one time, GUIDs (CodeId GUID PK) were used for the…
0
votes
1 answer

mvc3 SelectList SelectedValue is displayed but not returned in Edit view

I have an Edit view with the following DropDown list: @Html.DropDownListFor(model => model.Size, new SelectList(Enumerable.Empty(), "Size", "Size"), Model.Size, new { id = "WoodSize" }) …
-1
votes
1 answer

How to convert a model type to a viewmodel type within an ActionResult method in a controler

I am working on returning a view which was scaffolded off of the AnalyticsViewModel viewmodel. I am trying to create an object of type AnalyticsViewModel to pass as the object model to the BuyerDetails view (Which is located in the campaigns view…
Carter
  • 3
  • 2
-1
votes
2 answers

An MVC 6 route does not perform as expected

I have this route: routes.MapRoute(name: "Trads", url: "test_3000/{action}/{traditional}", defaults: new { controller = "Test_3000", action = "Subset", traditional = UrlParameter.Optional }); And a Test_3000Controller with this method: …
Jim Kay
  • 91
  • 6
-1
votes
1 answer

Why is "var update" unreachable code. What Can i do to get multiple returnOk statements working?

Is there a problem for me to use two return Ok statements in one If statement? i am returning Create and update from a class called PardotUtilites and Create returns me an Id. And Update should return first name, email and phone number after…
Micheal
  • 37
  • 6
-1
votes
1 answer

c# ActionController returns ActionController Viewbag = empty

Just like the 1st question that i asked here. I am working with a group on a project for our scool. We learned alot at this moment but we have just 1 issue I Made a Logincontroller and in each Controller there is a call to the logincontroller to…
-1
votes
2 answers

Sending a string to ActionResult using ajax

I am trying to send a string to my ActionResult in the controller. I have followed many tutorials and read hundreds of stackoverflows but can't get it to work. I am trying to send a string with the value of a radiobutton. My ActionResult code…
-1
votes
2 answers

Action result error: "The local variable success may not have been initialized."

" Unresolved compilation problems: The local variable input may not have been initialized The local variable success may not have been initialized The local variable input may not have been initialized" Ive been trying to populate my Database with 3…
Kyas
  • 39
  • 2
  • 7
-1
votes
1 answer

OrderByDescending doesn't exist?

I am not sure this is an error in my code or maybe something else messing with it however I have a function were I am creating a simple list from a MVC model in an ActionResult I have others that use OrderByDescending and work but this is throwing…
Damion
  • 1
1 2 3
30
31