Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why this code is not executing?
Message
Information générale
Forum:
ASP.NET
Catégorie:
MVC
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01555962
Message ID:
01555967
Vues:
45
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>I have a working Client controller with the Client method which I changed today to be this:
>

>Do you see what am I missing here? Why my Edit view is not being executed by the code above?

You're trying to return both a JSON result in one case, and a View in the other. Those are two completely different return types and you usually have two actions for them. So you've probably got some code in the page being displayed that is actually expecting to receive a JSON result back but instead you've passed it a bunch of HTML. It can't parse it so it's either failing or just not doing anything.

To do what you want you will most likely need to handle this on the client side via some Javascript. What I've done in the past is hooked into an event the grid fires after retrieving a result (hopefully whatever grid you're using has such an event) and looking at how many items were returned. If it was only one record, I do a redirect on the client side to the edit page.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform