asp.net mvc - i get Error executing child request for handler -
my login partial view. pass model contain some fields of tbl_profile partial view , fill , pass filled model actionresult in [httppost] part , ... i'm trouble in [httpget] part . error on line of cod " *@html.action("logon","account")"*. code :
[httpget] public actionresult logon(string returnurl) { using (var db = new mycontext()) { var allfeaturetolog = db.tbl_profile.select(u => new usersclass.logon { username = u.username, password_user = u.password_user }).tolist(); return partialview(allfeaturetolog); } }
class:
public class usersclass { public class logon { public string username { get; set; } public string password_user { get; set; } } }
logon.cshtml:
@model myproject.models.usersclass.logon @using (html.beginform()) { @html.antiforgerytoken() <form class="signin-form"> @html.textboxfor(m => m.username, new { @id = "username", @class = "input-block- level", @placeholder = "* enter username" }) @html.textboxfor(m => m.password_user, new { @id = "password", @class = "input-block-level", @placeholder = "* enter pass" }) @html.validationmessage("loginerror") <label class="checkbox"> <input type="checkbox">remember me</label> <button class="btn btn-medium btn-general input-block-level" type="submit"> enter</button> </form> }
error:
error executing child request handler 'system.web.mvc.httphandlerutil+serverexecutehttphandlerasyncwrapper'
use instead ::
@{ html.renderaction("logon","account"); }
this fix issue.
Comments
Post a Comment