c# - Using ASP.NET MVC, I moved my external login partial view within the login form section and now it is not working -
originally, "_externalloginslistpartial" partial view in it's own div so...
<div class="col-md-8"> <section id="loginform"> @using (html.beginform("login", "account", new { returnurl = viewbag.returnurl }, formmethod.post, new { @class = "form-horizontal", role = "form" })) { @html.antiforgerytoken() @html.validationsummary(true, "", new { @class = "text-danger" }) ... <div class="form-group"> <div class="col-md-offset-2 col-md-10"> <div class="checkbox"> @html.checkboxfor(m => m.rememberme) @html.labelfor(m => m.rememberme) </div> </div> </div> <div class="form-group"> <div class="col-md-offset-2 col-md-10"> <input type="submit" value="log in" class="btn btn-default" /> </div> </div> </section> </div> <div class="col-md-4"> <section id="socialloginform"> @html.partial("_externalloginslistpartial", new externalloginlistviewmodel { returnurl = viewbag.returnurl }) </section> </div> but want move "checkbox" div class so...
<div class="col-md-8"> <section id="loginform"> @using (html.beginform("login", "account", new { returnurl = viewbag.returnurl }, formmethod.post, new { @class = "form-horizontal", role = "form" })) { @html.antiforgerytoken() @html.validationsummary(true, "", new { @class = "text-danger" }) ... <div class="form-group"> <div class="col-md-offset-2 col-md-10"> <div class="checkbox"> @html.checkboxfor(m => m.rememberme) @html.labelfor(m => m.rememberme) @html.partial("_externalloginslistpartial", new externalloginlistviewmodel { returnurl = viewbag.returnurl }) </div> </div> </div> <div class="form-group"> <div class="col-md-offset-2 col-md-10"> <input type="submit" value="log in" class="btn btn-default" /> </div> </div> </section> </div> however, when click external login button partial view, validation messages pop textboxes not filled in within login form. tried removing validation external login button still not work.
how can move partial view within login form exclude validation , have link work?
Comments
Post a Comment