c# - create a panel for login using MVC /account/login -


using mvc4/5's auto generated code there shared _loginpartial.cshtml allows me call small (login) box in cshtml view @html.partial("_loginpartial") pretty cool , responsive element change depending on if user logged or not , show username.

my goal have drop down panel, wondering if put jquery in mix , on click show page.

here's code tried.

$(function () {     $('#loginbtn').on('click', function () {         var path = '/account/login'         $("#logincontent").load(path);     }); });                             </script>                              <button id="loginbtn">login</button>                             <ul class="sub-menu">                                 <li id="logincontent"></li> 

this passes in view doesn't show inside floating panel. here it's pushing page down.

is there c#/razor equivalent can place in _loginpartial.cshtml or _layout page keep html.partial call while rendering partial view in small panel.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -