Comments (1)
What's it look like from the browser in terms of the request?
On Friday, July 22, 2016, Tim [email protected] wrote:
Hi Jimmy,
I have very straightforward create action in my controller. After creation
I want to redirect to the edit action so the user can continue to edit the
newly created item. However the RedirectToActionJson doesn't seem to work
properly even though stepping through the code the edit action is being
called but the redirection to the edit URL still indicates the create
action (/SomeAction/Create) when I would have expected
/SomeAction/Edit/[new id]Could it be something to do with some StructureMap "magic" around ending
the request (StructureMapScopeModule) because I'm using Autofac?[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create(CreateEdit.Command command)
{
var id = _mediator.Send(command);
return this.RedirectToActionJson(c => c.Edit(new CreateEdit.Query { Id = id }));
}public ActionResult Edit(CreateEdit.Query query)
{
var model = _mediator.Send(query);
return View("CreateEdit", model);
}—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#27, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAGYMtYBuL-0wdr-dlxS9enVDm1eBNhTks5qYGy_gaJpZM4JSf3N
.
from contosouniversity.
Related Issues (20)
- How would you implement authorization business logic? HOT 1
- Areas HOT 3
- Use of Attribute Routing possible? HOT 4
- Autofac? HOT 4
- FormBlocks HOT 1
- Dispatching messages from command handler after committing DB transaction HOT 1
- Use AutoFac instead of StructureMap HOT 7
- HtmlTags v4 support HOT 3
- Unable to create instructor HOT 2
- Add .vs folder to gitignore
- using roundhouse; error after yesterday update
- Basic DropDownList HOT 4
- Why is MvcTransactionFilter related to SchoolContext ? HOT 5
- Unable to add a new department
- ASP.NET Core HOT 1
- Should features own the domain model as well? HOT 1
- Generic Notifications HOT 3
- Question: indexer on foreach HOT 1
- FxCop CA1034 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from contosouniversity.