Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Response.Redirect
Message
De
13/07/2016 02:52:37
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01638287
Message ID:
01638303
Vues:
41
>Hi everybody,
>
>I have HomeController.cs with this method:
>
>
>public ActionResult Index()
>        {
>            var retVal = _licenseProvider.ValidateExistingLicense();
>
>            if (!retVal.Item1)
>            {
>                Response.Redirect("DataMaintenance/ImportLicenses", true);
>            }
>
>Then the logic continues and finally it returns a View() (index).

>
>I'm wondering if it's possible to somehow return after re-direct? Perhaps use that view (ImportLicenses) instead of the index?
>
>If yes, how should I adjust that method?
>
>Thanks in advance.
>
>To expand on my question, as I already solved this first problem.
>
>I want to know from the ImportLicenses controller if I was re-directed there or came from the normal menu choice. How can I somehow pass information that I'm re-directing?

I thought that if the second Response.Redirect() parameter is 'true' then the logic *doesn't* continue (i.e. any code following the redirect is not executed) ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform