我有这个显示数据表的视图:
@if(Request.IsAuthenticated){
<fieldset id="detailPrix">
<legend>Details prix</legend>
<div class="scrollableContainer">
<div class="scrollingArea">
<table class="cruises scrollable">
<thead>
<tr>
<th>
Carburant
</th>
<th>
Prix
</th>
<th>
Date d'ajout
</th>
<th>
Mettre à jour
</th>
</tr>
</thead>
@for(int index =0; index<Model.carburants.Count;index++){
<tbody>
<tr>
<td>
@Html.DisplayName(Model.carburants[index].data.ToString())
</td>
<td>
@Html.DisplayName(Model.prixCarburants[index].ToString())
</td>
<td>
@Html.DisplayName(Model.dateAjoutCarburants[index].ToString())
</td>
<td>
@Html.ActionLink("Modifier", "ModifierPrix", new {carbuId = Model.carburants[index].id, stationId= Model.station.id, Myvmsd=Model, index=index, prix=Model.prixCarburants[index]})
</td>
</tr>
</tbody>
}
</table>
</div>
</div>
</fieldset>
}
else{
// If the user didn't authenticated, I want to display the popup modal to login (in JQuery or JS).
}
我希望我的登录视图进入模式弹出窗口。这是我的登录视图:
<section id="loginForm">
<h2>Connexion avec un compte local.</h2>
@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl })) {
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<fieldset>
<legend>Formulaire de connexion.</legend>
<ol>
<li>
@Html.LabelFor(m => m.UserName)
@Html.TextBoxFor(m => m.UserName)
@Html.ValidationMessageFor(m => m.UserName)
</li>
<li>
@Html.LabelFor(m => m.Password)
@Html.PasswordFor(m => m.Password)
@Html.ValidationMessageFor(m => m.Password)
</li>
<li>
@Html.CheckBoxFor(m => m.RememberMe)
@Html.LabelFor(m => m.RememberMe, new { @class = "checkbox" })
</li>
</ol>
<input id="LogIn" type="submit" value="Log in" />
</fieldset>
<p>
@Html.ActionLink("Register", "Register") Si vous n'avez pas de compte.
</p>
}
</section>
<section class="social" id="socialLoginForm">
<h2>Connexion via Les réseaux sociaux</h2>
@Html.Action("ExternalLoginsList", new { ReturnUrl = ViewBag.ReturnUrl })
</section>
例如,可以将此视图显示到 JQuery 中的模式弹出窗口中吗?提前感谢您的帮助!