|
I have a class that has this property
public Expression<Action<Controller>> Action { get; set; }
how to set it's value for example:
var x = new MyClass{ Action = What_To_Write_here }
Started by Omu on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
In same way as simple Action<Controller>
var x = new MyClass{ Action = controller =>.
|
|
I have a controller action which I would like to call another controller action.
Is this a valid thing to do. Is it possible?
Started by ListenToRick on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Also, you can use TempData to pass model (and other) data between controller actions..
Controller.RedirectToAction
As @Justice says you can use RedirectToAction.
|
|
Given the form below:
<form id="myForm" action="index.php"> <input type="hidden" name="action" value="list" /> <input type="submit" /> </form>
How can I get the value for the action property of the form ( index.php ) using IE6?...
Started by Tom on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Var form = document.forms.myForm; var action = form.getAttribute('action'); if (action....
The presence of the action field, clobbers the action property than 'action' if at all possible instead.
There isn't a simple way.
|
Ask your Facebook Friends
|
In ASP.NET MVC application I have an action Page() which renders a page (like a wiki page).
Now, I have another action RenderPdf() which should collect the HTML output of Page() and use HTML2PDF component to create PDF version of that page.
How do I collect...
Started by mladen on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Keep it hidden if/until user needs it?
You could check out this awnser to a similar question... .
If the pdf is just a copy of the output cant you use within the same model of the first action.
Output of an action, but from inside a view...
|
|
Is there a way to have an action filter, like
public class MyActionFilterAttribute : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext context) { ...
be automatically applied to all actions in a web site?
Started by J. Pablo Fernández on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Looks like a small amount of work.
Showing how you can achieve application wide action filters.
|
|
The bad 'return JavaScript' goes like this:
This is the action link that gets selected.
Ajax.ActionLink("Sign Out", "LogOff", "Account", new AjaxOptions { })
This is the action.
public ActionResult LogOff() { FormsAuth.SignOut(); return JavaScript("ClearDisplayName...
Started by A. Elliott on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
JavaScript("ClearDisplayName") from the LogOff action, I redirected to another action, LogOffA.
|
|
I have an OptionsController , which contains an action account . The corresponding view has three forms, which post to three different actions, update_profile , update_user and change_password . Each action runs and then should redirect back to action...
Started by Daniel Vandersluis on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
It's my understanding.
That nonobviously shatters the expected behavior of an action is probably too much magic.
|
|
Is it possible to clear one action's cache from another action?
Let's say my Index action lists all my Widgets. There are lots of Widgets but new ones are not created very often. So I want to cache my Index action indefinitely but force it to render after...
Started by Lobstrosity on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Use a VaryByCustom property.
IMHO if you call the Create action you won't hit the cache because you are just rendering a view and not redirecting to the Index action whose output has been cached.
|
|
Hi,
We've been trying to redirect from one action to another, hoping that data would pass itself from ActionForm to ActionForm. Basically, we have to actions. The first action receives a request from the browser, prints some data field, and forwards it...
Started by Tom on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
The code is simple as that ....
Can i see the jsp file? How you wanted too .
Reason why you need two different actionforms? If not try modifying the second action mapping to name="formA" and the action itself to use FormA rather than FormB.
|
|
I have two pages I need, and want to show for the url /index and /review. The only difference between the two pages is on the review I will have a review comment section to show and Submit button. Otherwise the two pages are identical. I thought I could...
Started by Chance Robertson on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Model example
public.
This would allow you to delete the review action and view.
Is not necessary.
|