/// <summary> /// 添加关注控件 /// </summary> /// <param name="htmlHelper"></param> /// <param name="followedUserId">被关注用户Id</param> /// <param name="buttonName">按钮名称</param> /// <param name="followedButtonType">已关注按钮样式</param> /// <param name="followButtonType">加关注按钮样式</param> /// <returns></returns> public static MvcHtmlString FollowUser(this HtmlHelper htmlHelper, long followedUserId, string buttonName = "关注", FollowedButtonTypes followedButtonType = FollowedButtonTypes.Default, FollowButtonTypes followButtonType = FollowButtonTypes.Button) { htmlHelper.ViewData["followedUserId"] = followedUserId; htmlHelper.ViewData["followedButtonType"] = followedButtonType; htmlHelper.ViewData["followButtonType"] = followButtonType; htmlHelper.ViewData["buttonName"] = buttonName; return htmlHelper.DisplayForModel("FollowUser"); }
/// <summary> /// 添加关注控件 /// </summary> /// <param name="htmlHelper"></param> /// <param name="followedUserId">被关注用户Id</param> /// <param name="buttonName">按钮名称</param> /// <param name="followedButtonType">已关注按钮样式</param> /// <param name="followButtonType">加关注按钮样式</param> /// <returns></returns> public static MvcHtmlString FollowUser(this HtmlHelper htmlHelper, long followedUserId, string buttonName = "关注", FollowedButtonTypes followedButtonType = FollowedButtonTypes.Default, FollowButtonTypes followButtonType = FollowButtonTypes.Button) { htmlHelper.ViewData["followedUserId"] = followedUserId; htmlHelper.ViewData["followedButtonType"] = followedButtonType; htmlHelper.ViewData["followButtonType"] = followButtonType; htmlHelper.ViewData["buttonName"] = buttonName; return(htmlHelper.DisplayForModel("FollowUser")); }