我需要帮助才能使代码可行
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:方法'Write'没有重载需要0个参数
感谢您的期待
答案 0 :(得分:0)
在renderpartial删除之前问题是和额外的@删除了错误