阅读背景:

如何在Viewbag mvc4中显示数据?

来源:互联网 

this is my controller

这是我的控制器

 public ActionResult Index()
    {
       var data = (from o in db.aspnet_Users
                          from q in db.aspnet_Profile
                          where
                          o.UserId == q .UserId
                          select new{
                              o.UserId,
                              o.UserName,
                              q.Address,
                              q.Email,
                              q.Phone,
                              q.Mobile,
                              q.SocialID,                                  
                          }
                          ).ToList();
       ViewData["Allprofile"] = data;
        return View();
    }
 public Actio



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: