0

我需要帮助才能使下面的代码可行

 public ActionResult _StaffBlogs()
    { 
        string userkey = Membership.GetUser().ProviderUserKey.ToString();
        if (userkey != null || userkey != " ")
        {
            var blogstaff = db.Blogs
                .Where(u => u.IsLive == true)
                .Where(u => u.UserGuId == userkey)
                .OrderByDescending(u => u.Id)
                .Take(10);
            return PartialView(blogstaff);
        }
       return View();
    }

在视图中我有这种情况

  @if(Request.IsAuthenticated )
    {
   @{Html.RenderAction("_StaffBlogs", "Blog");}
     }

错误显示编译器错误消息:CS1501:方法“写入”没有重载需要 0 个参数

感谢期待

4

1 回答 1

0

问题是在renderpartial删除它之前额外的@消除了错误

于 2013-03-07T18:08:02.397 回答