asp.net - Not able to understand error message: The best overloaded method match for 'System.Web.Mvc.MvcHtmlString.Create(string)' has some invalid arguments -
i having error message:
the best overloaded method match 'system.web.mvc.mvchtmlstring.create(string)' has invalid arguments
what wrong in code? seems not reach controller.
i having following piece of code in view:
var list = @mvchtmlstring.create(myproject.controllers.testcontroller.getlist(datetime.today));
in controller have following piece of code:
public static jsonresult getlist( datetime date, int id=0) { return new jsonresult { data = mymodelmodel.userslist(id, date), jsonrequestbehavior = jsonrequestbehavior.allowget }; }
userslist return follows:
> list<datetime> dateslist = new list<datetime>(); return dateslist.stringify();
getlist() returns jsonresult
mvchtmlstring.create obviousely accepts string
Comments
Post a Comment