MVC javascript redirect page not working
In MVC, the default views for a controller allow one to reach the edit
page via selecting an item in an index and using that id to reach the
specific edit page.
In this MVC edit page, I have a javascript that reacts to a change in a
dropdown. The dropdown represents a subset of the potential id's available
from the index page, and in general, someone will choose a different one
than the currently displayed one.
The postback to the control works correctly in C#, and I can find the
relevant model that goes with the id. It all appears correct on the C#
controller side. However, when I try to get it to redirect back to the
same edit page but with a different id (that from the dropdown), the page
reverts back to the ajax call.
Is there anyway to "short-circuit" the ajax call so that it "knows" that
it doesn't return but lets the C# redirect to the edit page (just like
what happens when an element is chosen from the index page).
Thanks in advance,
Joseph Doggie
No comments:
Post a Comment