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
2 answers

Partialview result returns null

Partial view does not return any data.When i check with debug tool on PartialView page(_ContentBlock.cshtml), model seem to null. Controller public ActionResult Module() { int RouteDataValue = default(int); if (RouteData.Values["id"] !=…
0
votes
0 answers

c# mvc4 Print to a web browser during long running action

I have a long running action that runs multiple steps. I would like to output intermediate text to the browser in order to know where the process is, for example public ActionResult Index() { print("Running step 1"); // to the browser window …
Avba
  • 14,822
  • 20
  • 92
  • 192
0
votes
1 answer

Closing a Jquery Dialog after a Document is returned via ActionResult

I have a JQuery Dialog that is used to pass some information to the server. The ActionResult Method then generates a document. This is then returned to the browser. All good so far. However, I am wanting to close the dialog when the document is…
Mendelev
  • 23
  • 6
0
votes
1 answer

Posting rendered html page to a web service? Best way to transmit data?

I am creating a web service that will send an email via Amazon SES. I want to separate the service(API) from the actual application that is going to take in data to be sent. So all I want to send the service is the to address, subject line, and…
recneps
  • 1,285
  • 5
  • 16
  • 27
0
votes
1 answer

How can I return two views from an action?

How can I return two views from an action? I tried as below but I got an error. public ActionResult Page() { //LINQ x expressions //LINQ y expressions if (Request.QueryString["type"] == "x") { return View(linqExpX.ToList()); …
user2282567
  • 781
  • 1
  • 7
  • 14
0
votes
1 answer

MVC4 Ajax.ActionLink Breaks

Answered!! Okay, I am EXTREMELY new to MVC4 and am still in the learning stages of Ajax so I could really use some help with this one.... the more I work on it, the messier it gets. :( Here we go! I have a small application that I'm using as…
SiSan
  • 55
  • 1
  • 15
0
votes
3 answers

Why my link when clicked calls wrong action result

I have this problem. I have edit page and one of its properties are hyper links. One div is displaying video list I want that if I click any link (e.g. "Delete") it will trigger ajax call to delete the selected item. However I have strange problem.…
Jobert Enamno
  • 4,403
  • 8
  • 41
  • 63
0
votes
1 answer

button event not working

I want this: @using (Html.BeginForm("bgcTest", "CompaniesController")) {

Ange BolagsID:

} To fire this…
0
votes
2 answers

How can I dynamically alter the files in the /Content directory in ASP.NET MVC?

When I serve a javascript file to a user from the /Content Directory I want to replace a string token in that file with a value, so that when the user requests a given file, it has all the customizations they expect. I think that means I need to…
makerofthings7
  • 60,103
  • 53
  • 215
  • 448
0
votes
2 answers

ASP.NET MVC ActionResult method confusion

In my ASP.NET MVC application I want to just update two variables in my Register method. My register method in my controller looks like this(it hasn't got its own view, so im not sure what to return in this case): [HttpPost] public ActionResult…
Andreas
  • 185
  • 12
0
votes
2 answers

When does ActionResult get evaluated?

I am a bit confused as to when ActionResult actually gets evaluated. When using the Authorize attribute, I can see that if the user is not authorized, the result context gets set to an unauthorized result: filterContext.Result = new…
Andy T
  • 10,223
  • 5
  • 53
  • 95
0
votes
1 answer

jquery get() method access actionresult with parameter

I have an ActionResult method : public ActionResult GetData(int id) { return Json(CreateCompaniesList(), JsonRequestBehavior.AllowGet); } and want to access it with the jQuery get method. If it is just : public ActionResult GetData() { …
yanko89
  • 11
0
votes
1 answer

MVC3 delete action-name all

I have 3 action name delete on 3 different controllers which are on "registration,profile and questions" they all have action delete methods. How can I from my registration-delete method call out profile-delete and questions-delete . That way when a…
user1591668
  • 2,591
  • 5
  • 41
  • 84
0
votes
1 answer

Can MVC's ValidateRequest be triggered in code?

Possible Duplicate: Handle validation failures myself in ASP.NET MVC I have an action method that takes HTML input (potentially). [ValidateInput(false)] [HttpPost] public ActionResult Cms(string pageContent) { CmsData = pageContent; return…
Michael Kennedy
  • 3,202
  • 2
  • 25
  • 34
0
votes
1 answer

Can I call an ActionResult from within an ActionResult and work with the returned HTML

Possible Duplicate: In MVC3 Razor, how do I get the html of a rendered view inside an action? Ok, here is the scenario. I have an Action Result that returns a nicely formatted Partial View. I want the exact same HTML result to be sent out in an…
Mike Ross
  • 31
  • 1