0
我已经写了下面的代码来从我的Controller Action方法中检索用户详细信息。dojo xhrGet不适合我
dojo.xhrGet
({
url: "/UserManagement/GetUserDetailsFromLDAP/?userName=" + userName + "&domain=" + domain,
load: function (data) {
alert("Data: " + data);
},
preventCache: true,
sync: true,
error: function (err) {
alert("Error=" + err);
}
});
我的控制器的操作方法是如此简单象下面这样:
[HttpGet]
public ActionResult GetUserDetailsFromLDAP(string userName, string domain)
{
Dictionary<string, object> user = QRProxyManager<IUsrMgmtSvc>.Execute(svc => svc.GetLDAPUserDetails(userName, domain));
return View("CreateUser", user);
}
我已经使用招调试和我收到以下错误:
The model item passed into the dictionary is of type
'System.Collections.Generic.Dictionary`2[System.String,System.Object]',
but this dictionary requires a model item of type
'QR.NGLMS.ServicesRef.UserSvc.User'.
可有人请建议是什么问题?