private void BindItemsList() { blltag = new BllTag(); lsttag = new List <DtoTag>(); lsttag = blltag.GetAllTags(UserID, SearchText, PageNo, 10, flow); }
protected void btnadd_Click(object sender, EventArgs e) { try { _dtotag = new DtoTag { Link = ViewState["_link"].ToString(), WebsiteName = ViewState["_websiteName"].ToString(), UserId = UserId, TagName = txttag.Text }; var blltag = new BllTag(); blltag.AddTag(_dtotag); _bllpremalink = new BllPremalink(); GridPremalinkTags.DataSource = _bllpremalink.GetPremalinkTagsById(Convert.ToInt64(ViewState["_premalinkId"])); GridPremalinkTags.DataBind(); txttag.Text = ""; } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
protected void Page_Load(object sender, EventArgs e) { try { IsUser(); SearchText = Request.QueryString["search"] ?? ""; _pageNo = Request.QueryString["PageNo"] != null ? Convert.ToInt32(Request.QueryString["PageNo"]) : 1; txtinputtagfollow.Attributes.Add("onblur", "blurfunction('searchstagpan','" + txtinputtagfollow.ClientID + "')"); _blltag = new BllTag(); Lsttag = new List <DtoTag>(); Flow = Request.QueryString["flow"] ?? "search"; BindItemsList(); } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
public static string voteTag(long premalinkId, long TagId, string vote) { try { HttpCookie _cookie; _cookie = HttpContext.Current.Request.Cookies["Tagged"]; long result; if (_cookie != null && Int64.TryParse(UtilityClass.DecryptStringAES(_cookie["d"]), out result)) { if (result > 0) { var blltag = new BllTag(); var news = new DtoNewsFeed(); news.TagId = TagId; news.UserId = Convert.ToInt64(UtilityClass.DecryptStringAES(_cookie["d"])); news.Title = vote; news.PremalinkId = premalinkId; blltag.VoteContent(news); return("1"); } return(null); } return(null); } catch (Exception ex) { ex.ToExceptionless().Submit(); } return(null); }
public static string GetwallTags(string Premalink) { try { var blltag = new BllTag(); JObject o = JObject.FromObject(new { Tag = new { Item = from p in blltag.GetTagsbyPremalink(Premalink) select new { Id = p.TagId, Vote = p.VoteType, p.TagName } } }); return(o.ToString()); } catch (Exception ex) { ex.ToExceptionless().Submit(); } return(null); }
public static DalTag ToDal(this BllTag tag) { return(new DalTag { Id = tag.Id, Name = tag.Name, PostId = tag.PostId }); }
public string GetEmotion(string websitename, string premalink) { try { _websiteurl = new Uri(premalink); GetCookie(); _bltag = new BllTag(); _bllemo = new BllEmotions(); _bllwebsite = new BllWebsite(); _lsttag = new List <DtoTag>(); _lstemo = new List <DtoEmotions>(); _dtowebsite = new DtoWebsite(); _lstemo = _bllemo.GetAllEmotion(websitename, premalink, _userId); _dtowebsite = _bllwebsite.GetWebsiteByName(websitename); if (_dtowebsite != null) { ViewState["websiteid"] = _dtowebsite.WebsiteId; ViewState["addEmotion"] = _dtowebsite.AddEmotion; Emotionflag = _dtowebsite.Emotion; if (Emotionflag) { if (Convert.ToBoolean(ViewState["addEmotion"])) { deleteemoanchor.Style.Add("display", "inline"); addemoanchor.Style.Add("display", "inline"); } else { deleteemoanchor.Style.Add("display", "none"); addemoanchor.Style.Add("display", "none"); } } } var emotion = ""; if (_lstemo != null) { foreach (var emo in _lstemo) { emotion += "|" + emo.EmotionName + "," + emo.Emotionid + "," + emo.TotalCount + "," + emo.IsActive; } } return(emotion); } catch (Exception ex) { ex.ToExceptionless().Submit(); } return(null); }
public static void DeleteTag(long premalinkid, long tagid) { try { var blltag = new BllTag(); blltag.DeleteTag(premalinkid, tagid); } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
protected void Page_Load(object sender, EventArgs e) { try { GetCookie(); if (!IsPostBack) { ViewState["websiteId"] = 0; ViewState["UserID"] = 0; _bllwebsite = new BllWebsite(); _blltag = new BllTag(); _bllemotions = new BllEmotions(); if (Request.QueryString["WebsiteId"] != null) { ViewState["websiteId"] = Convert.ToInt64(Request.QueryString["WebsiteId"]); Dtowebsite = _bllwebsite.GetWebsiteById(Convert.ToInt64(ViewState["websiteId"])); Lsttag = _blltag.GetTagByWebsite(Convert.ToInt64(ViewState["websiteId"])); Lstemotions = _bllemotions.GetEmotionByWebsite(Convert.ToInt64(ViewState["websiteId"])); if (Lsttag != null && Lsttag.Count > 0) { foreach (DtoTag t in Lsttag) { Tagstring += t.TagId + ","; } hdntagstring.Value = Tagstring; } if (Lstemotions != null && Lstemotions.Count > 0) { foreach (DtoEmotions E in Lstemotions) { Emostring += E.Emotionid + ","; } hdnemostring.Value = Emostring; } } } else { Response.Redirect("../Default.aspx"); } } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
public static IEnumerable TagIntellisense(string PrefixText, string Premalink) { try { var bllbtag = new BllTag(); return(bllbtag.TagIntellisense(PrefixText, Premalink)); } catch (Exception ex) { ex.ToExceptionless().Submit(); } return(null); }
public static string GetTagged(long tagId) { try { var blltag = new BllTag(); return(blltag.GetTagged(tagId)); } catch (Exception ex) { ex.ToExceptionless().Submit(); } return(null); }
public static IEnumerable TagIntellisense(string prefixText) { try { var bllbtag = new BllTag(); return(bllbtag.SearchTag(prefixText)); } catch (Exception ex) { ex.ToExceptionless().Submit(); } return(null); }
public string GetTag(string websitename, string premalink) { try { _websiteurl = new Uri(premalink); _bltag = new BllTag(); _bllwebsite = new BllWebsite(); _lsttag = new List <DtoTag>(); _dtowebsite = new DtoWebsite(); _lsttag = _bltag.GetAllTag(websitename, premalink, _userId); _dtowebsite = _bllwebsite.GetWebsiteByName(websitename); if (_dtowebsite != null) { ViewState["websiteid"] = _dtowebsite.WebsiteId; ViewState["addTag"] = _dtowebsite.AddTag; ViewState["rateTag"] = _dtowebsite.RateTag; ViewState["addEmotion"] = _dtowebsite.AddEmotion; if (Convert.ToBoolean(ViewState["addTag"])) { Minusanchor.Style.Add("display", "inline"); addanchor.Style.Add("display", "inline"); } else { Minusanchor.Style.Add("display", "none"); addanchor.Style.Add("display", "none"); } } var tags = ""; if (_lsttag != null) { foreach (var tag in _lsttag) { tags += "|" + tag.TagName + "," + tag.TagId + "," + tag.TagCount + "," + tag.IsActive; } } _metaTagCheck = _lsttag != null && _lsttag[0].MetaTagCheck; return(tags); } catch (Exception ex) { ex.ToExceptionless().Submit(); } return(null); }
public static string GetUserTags(long profileUserId) { try { HttpCookie cookie = HttpContext.Current.Request.Cookies["Tagged"]; var blltag = new BllTag(); return(blltag.GetUserTags(profileUserId, Convert.ToInt64(UtilityClass.DecryptStringAES(cookie["d"])))); } catch (Exception ex) { ex.ToExceptionless().Submit(); } return(""); }
protected void Page_Load(object sender, EventArgs e) { try { //System.Diagnostics.Debugger.Launch(); IsUser(); UserID = GetUserId(); _blluser = new BllUser(); _blltag = new BllTag(); Lstdtonewsfeed = new List <DtoNewsFeed>(); if (Request.QueryString["flow"] != null) { Flow = Request.QueryString["flow"]; if (Request.QueryString["flow"].ToLower() == "userprofile") { if (Request.QueryString["TagID"] != null && Request.QueryString["EmoID"] != null) { _tagId = Convert.ToInt64(Request.QueryString["EmoID"]); Lstdtonewsfeed = _blltag.GetEmoNewsFeed(UserID, Convert.ToInt32(_tagId), 1, 10); } else if (Request.QueryString["TagID"] != null) { _tagId = Convert.ToInt64(Request.QueryString["TagID"]); Lstdtonewsfeed = _blltag.GetTagNewsFeed(UserID, _tagId, 1, 10); } } else if (Request.QueryString["flow"].ToLower() == "explore") { _tagId = Convert.ToInt64(Request.QueryString["TagID"]); Lstdtonewsfeed = _blltag.GetTagNewsFeed(UserID, _tagId, 1, 10); } else if (Request.QueryString["flow"].ToLower() == "search") { _tagId = Convert.ToInt64(Request.QueryString["search"]); Lstdtonewsfeed = _blltag.GetTagNewsFeed(UserID, _tagId, 1, 10); } } else { Lstdtonewsfeed = _blluser.GetUserNewsFeed(UserID, 1, 40); } } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
public static string GetTagsbyPremalink(string Premalink) { try { HttpCookie cookie = HttpContext.Current.Request.Cookies["Tagged"]; JObject o; if (cookie != null) { var blltag = new BllTag(); var lsttag = new List <DtoTag>(); lsttag = blltag.GetTagsbyPremalink(Premalink); if (lsttag != null && lsttag.Count > 0) { o = JObject.FromObject(new { Tag = new { Item = from p in lsttag select new { Id = p.TagId, Vote = p.VoteType, p.TagName } } }); return(o.ToString()); } } else { return(null); } return(null); } catch (Exception ex) { ex.ToExceptionless().Submit(); } return(null); }
protected void Page_Load(object sender, EventArgs e) { try { if (Request.QueryString["search"] != null) { SearchText = Request.QueryString["search"]; } else { SearchText = ""; } if (Request.QueryString["PageNo"] != null) { PageNo = Convert.ToInt32(Request.QueryString["PageNo"]); } else { PageNo = 1; } blltag = new BllTag(); lsttag = new List <DtoTag>(); if (Request.QueryString["flow"] != null) { flow = Request.QueryString["flow"]; } else { flow = "search"; } GetCookie(); BindItemsList(); } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
public static void voteTag(long premalinkId, long TagId, string vote, int UserID) { try { var blltag = new BllTag(); var news = new DtoNewsFeed { TagId = TagId, UserId = Convert.ToInt32(UserID), Title = vote, PremalinkId = premalinkId }; news.UserId = UserID; blltag.VoteContent(news); } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
protected void Page_Load(object sender, EventArgs e) { try { IsUser(); if (!IsPostBack) { var uId = GetUserId(); ViewState["tagid"] = 0; //cookie = this.Request.Cookies["Tagged"]; _dtotag = new DtoTag(); _blltag = new BllTag(); //BtnTagFollow.Attributes.Add("onclick", "AddUserTagSubscription('" + tagid.ToString() + "')"); if (Request.QueryString["flow"] != null) { if (Request.QueryString["flow"].ToLower() == "explore") { ViewState["tagid"] = Convert.ToInt64(Request.QueryString["Id"]); Lstdtonewsfeed = _blltag.GetTagNewsFeed(uId, Convert.ToInt64(ViewState["tagid"]), 1, 10); _dtotag = _blltag.GetTagById(Convert.ToInt64(ViewState["tagid"])); lbltagname.Text = _dtotag.TagName; } else if (Request.QueryString["flow"].ToLower() == "inlinecode") { ViewState["tagid"] = Convert.ToInt64(Request.QueryString["Id"]); Websiteid = Convert.ToInt64(Request.QueryString["WebsiteId"]); Lstdtonewsfeed = _blltag.GetTagNewsFeed(uId, Convert.ToInt64(ViewState["tagid"]), 1, 10); _dtotag = _blltag.GetTagById(Convert.ToInt64(ViewState["tagid"])); lbltagname.Text = _dtotag.TagName; Lsttag = _blltag.GetWebsiteTags(Websiteid); } } } } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
private void BindItemsList() { _blltag = new BllTag(); Lsttag = new List <DtoTag>(); Lsttag = _blltag.GetAllTags(GetUserId(), SearchText, _pageNo, 30, Flow); if (Lsttag != null) { if (Lsttag.Count > 0) { var q = (from c in Lsttag select c.TagCount).Max(); if (Flow != "myfollow") { lnkfollow.Attributes.Add("value", "My Follow ( " + q + " )"); lnkfollow.Attributes.CssStyle.Add("display", ""); lnkfollow.Attributes.Add("onclick", "window.location='Follow.aspx?PageNo=1&flow=myfollow'"); lnkback.Attributes.CssStyle.Add("display", "none"); } else { lnkfollow.Attributes.CssStyle.Add("display", "none"); lnkback.Attributes.CssStyle.Add("display", ""); lnkback.Attributes.Add("onclick", "window.location='Follow.aspx?flow=search&PageNo=1'"); } } else { if (Flow == "myfollow") { lnkfollow.Visible = false; lnkback.Visible = true; } lblnodata.Visible = true; } } }
protected void Page_PreInit(object sender, EventArgs e) { try { if (!IsPostBack) { GetCookie(); _blltag = new BllTag(); Lstdtonewsfeed = new List <DtoNewsFeed>(); if (Request.QueryString["flow"] != null && Request.QueryString["flow"].ToLower() == "search") { _search = Request.QueryString["search"]; _pageNo = Convert.ToInt32(Request.QueryString["PageNo"]); Lstdtonewsfeed = _blltag.ExplorehNewsFeed(_userId, _search, _pageNo, 10); } } } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
public static void voteTag(string premalink, long tagId, string vote, string flow, long TagId, long profileUserId) { try { HttpCookie cookie = HttpContext.Current.Request.Cookies["Tagged"]; var blltag = new BllTag(); var tag = new DtoTag(); tag.TagId = tagId; tag.UserId = Convert.ToInt64(UtilityClass.DecryptStringAES(cookie["d"])); tag.VoteType = vote; tag.Link = premalink; if (flow.ToLower() == "userprofile") { tag.UserId = profileUserId; blltag.VoteUserTag(tag); } else if (flow.ToLower() == "tagged") { tag.TagId = tagId; tag.TagCount = TagId; blltag.VoteTagged(tag); } else { blltag.VoteTag(tag); } } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
public static long voteTag(string premalink, long TagId, string vote) { try { var blltag = new BllTag(); var tag = new DtoTag(); var cookie1 = HttpContext.Current.Request.Cookies["Tagged"]; if (cookie1 != null) { tag.TagId = TagId; tag.UserId = Convert.ToInt64(UtilityClass.DecryptStringAES(cookie1["d"])); tag.VoteType = vote; tag.Link = premalink; return(blltag.VoteTag(tag)); } return(-2); } catch (Exception ex) { ex.ToExceptionless().Submit(); } return(0); }
protected void Page_Load(object sender, EventArgs e) { try { GetCookie(); _bllwebsite = new BllWebsite(); _blltag = new BllTag(); _bllemotion = new BllEmotions(); Lstdtonewsfeed = new List <DtoNewsFeed>(); string[] items; if (!IsPostBack) { ViewState["UserID"] = 0; } if (Request.QueryString["WebsiteId"] != null) { Websiteid = Convert.ToInt64(Request.QueryString["WebsiteId"]); if (Request.QueryString["TagId"] != null) { string tagarray = Request.QueryString["TagId"]; if (tagarray.Split(',').Length > 0) { items = tagarray.Split(','); for (int i = 0; i < (items.Length - 1); i++) { if (!(Convert.ToInt64(items[i]) > 0)) { TagId = ""; // error SQL injection break; } } TagId = Request.QueryString["TagId"]; } else { TagId = Request.QueryString["TagId"]; } } else { TagId = ""; } if (Request.QueryString["EmoId"] != null) { string emoarray = Request.QueryString["EmoId"]; if (emoarray.Split(',').Length > 0) { items = emoarray.Split(','); for (int i = 0; i < (items.Length - 1); i++) { if (!(Convert.ToInt64(items[i]) > 0)) { EmoId = ""; // error SQL injection break; } } EmoId = Request.QueryString["EmoId"]; } else { EmoId = Request.QueryString["EmoId"]; } } else { EmoId = ""; } if (EmoId.Length > 0) { EmoId = EmoId.Remove(EmoId.Length - 1, 1); } if (TagId.Length > 0) { TagId = TagId.Remove(TagId.Length - 1, 1); } Lstdtonewsfeed = _bllwebsite.GetWebsiteFeed(Convert.ToInt64(ViewState["UserID"]), Websiteid, TagId, EmoId, 1, 10); } } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
protected void Page_Load(object sender, EventArgs e) { try { GetCookie(); if (!IsPostBack) { ViewState["tagid"] = 0; _bllwebsite = new BllWebsite(); _blltag = new BllTag(); _blluser = new BllUser(); if (Request.QueryString["PageNo"] != null) { _pageNumber = Convert.ToInt32(Request.QueryString["PageNo"]); } if (Request.QueryString["flow"] == "inlinecode") { if (Request.QueryString["Id"] != null) { ViewState["tagid"] = Convert.ToInt64(Request.QueryString["Id"]); } Lstdtonewsfeed = _blltag.GetTagNewsFeed(_userId, Convert.ToInt64(ViewState["tagid"]), _pageNumber, 40); } else if (Request.QueryString["flow"] == "wall") { Lstdtonewsfeed = _blluser.GetUserNewsFeed(_userId, _pageNumber, 40); } else if (Request.QueryString["flow"] == "profile") { if (Request.QueryString["TagId"] != null && Request.QueryString["EmoId"] != null) { var tagstr = Request.QueryString["TagId"]; var emostr = Request.QueryString["EmoId"]; Lstdtonewsfeed = _blluser.GetUserTagFeed(_userId, tagstr, emostr, _pageNumber, 10); } } else if (Request.QueryString["flow"] == "website") { if (Request.QueryString["TagId"] != null && Request.QueryString["EmoId"] != null && Request.QueryString["WebsiteId"] != null) { var tagstr = Request.QueryString["TagId"]; var emostr = Request.QueryString["EmoId"]; var websiteId = Convert.ToInt64(Request.QueryString["WebsiteId"]); Lstdtonewsfeed = _bllwebsite.GetWebsiteFeed(_userId, websiteId, tagstr, emostr, _pageNumber, 10); } } } } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
protected void Page_Load(object sender, EventArgs e) { try { IsUser(); if (!IsPostBack) { ViewState["CurrentUserProfileID"] = 0; if (Request.QueryString["Id"] != null) { ViewState["CurrentUserProfileID"] = Convert.ToInt64(Request.QueryString["Id"]); if (Convert.ToInt64(ViewState["CurrentUserProfileID"]) == 0) { ViewState["CurrentUserProfileID"] = UserId; } } else if (UserId > 0) { ViewState["CurrentUserProfileID"] = UserId; } Dtouser = new DtoUser(); _blluser = new BllUser(); Dtouser = _blluser.GetUserGeneralInfo(Convert.ToInt64(ViewState["CurrentUserProfileID"])); if (Dtouser.ImageUrl != "") { Dtouser.ImageUrl = "/Uploads/" + Dtouser.ImageUrl + ".jpg"; } else if (Dtouser.CoverPhoto != "") { Dtouser.CoverPhoto = "/Uploads/" + Dtouser.CoverPhoto + ".jpg"; } if (Imageurl != null) { } else { Ima = "../Images/no_photo.jpg"; } _blltag = new BllTag(); _bllemotion = new BllEmotions(); Lsttag = _blltag.GetTagByUser(Convert.ToInt64(ViewState["CurrentUserProfileID"])); Lstemotions = _bllemotion.spGetEmotionByUser(Convert.ToInt64(ViewState["CurrentUserProfileID"])); if (Lsttag != null && Lsttag.Count > 0) { foreach (DtoTag t in Lsttag) { Tagstring += t.TagId + ","; } hdntagstring.Value = Tagstring; } if (Lstemotions != null && Lstemotions.Count > 0) { foreach (DtoEmotions E in Lstemotions) { Emostring += E.Emotionid + ","; } hdnemostring.Value = Emostring; } } else { Response.Redirect("../Default.aspx"); } } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
protected void btnSave_Click(object sender, EventArgs e) { try { //System.Diagnostics.Debugger.Launch(); var blltag = new BllTag(); string tag = hdntag.Value; string[] level1 = tag.Split('|'); if (ViewState["flow"].ToString().ToLower() == "userprofile") { for (int i = 1; i < level1.Length; i++) { string[] level2 = level1[i].Split(','); if (level2[3] == "1") { blltag.AddUserTags(level2[0], Convert.ToInt64(ViewState["ProfileUserID"]), Convert.ToInt64(ViewState["UserID"])); } } } else if (ViewState["flow"].ToString().ToLower() == "tagged") { for (int i = 1; i < level1.Length; i++) { string[] level2 = level1[i].Split(','); if (level2[3] == "1") { blltag.AddTagged(new DtoTag { TagName = level2[0], TagId = Convert.ToInt64(ViewState["TagId"]), UserId = Convert.ToInt64(ViewState["UserID"]) }); } } } else if (ViewState["flow"].ToString().ToLower() == "inlinecode") { for (int i = 1; i < level1.Length; i++) { string[] level2 = level1[i].Split(','); if (level2[3] == "1") { if (ViewState["WebsiteName"].ToString() == "") { var u = new Uri(ViewState["Premalink"].ToString()); ViewState["WebsiteName"] = u.Host; } blltag.AddTag(new DtoTag { TagName = level2[0], Link = ViewState["Premalink"].ToString(), WebsiteName = ViewState["WebsiteName"].ToString(), TagType = "0", UserId = Convert.ToInt64(ViewState["UserID"]) }); } } } else if (ViewState["flow"].ToString().ToLower() == "bookmarklet") { for (int i = 1; i < level1.Length; i++) { string[] level2 = level1[i].Split(','); if (level2[3] == "1") { blltag.AddTag(new DtoTag { TagName = level2[0], Link = ViewState["Premalink"].ToString(), TagType = "0", UserId = Convert.ToInt64(ViewState["UserID"]) }); } } } else { for (int i = 1; i < level1.Length; i++) { string[] level2 = level1[i].Split(','); if (level2[3] == "1") { if (ViewState["WebsiteName"].ToString() == "") { var u = new Uri(ViewState["Premalink"].ToString()); ViewState["WebsiteName"] = u.Host; } blltag.AddTag(new DtoTag { TagName = level2[0], Link = ViewState["Premalink"].ToString(), WebsiteName = ViewState["WebsiteName"].ToString(), TagType = "0", UserId = Convert.ToInt64(ViewState["UserID"]) }); } } } Response.Redirect(Request.RawUrl); } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
public void Delete(BllTag entity) { repository.Delete(entity.ToDal()); unitOfWork.Commit(); }
public static IEnumerable HowTagIntellisense(string prefixText, string websitename) { BllTag bllbtag = new BllTag(); return(bllbtag.HowTagIntellisense(prefixText, Premalink, websitename)); }
protected void btnSave_Click(object sender, EventArgs e) { bltag = new BllTag(); DtoTag t = new DtoTag(); try { if (hdnWhattag.Value != null && hdnWhattag.Value.ToString() != "") { string[] Whatoldtags = ViewState["Whattags"].ToString().Split('|'); string[] Whatnewtags = hdnWhattag.Value.Split('|'); for (int i = 1; i < Whatnewtags.Length; i++) { if (Convert.ToInt64(Whatnewtags[i].Split(',')[2]) == 1) { t = new DtoTag(); t.TagId = Convert.ToInt64(Whatnewtags[i].Split(',')[1]); t.TagName = Whatnewtags[i].Split(',')[0]; t.Link = Premalink; t.WebsiteName = WebsiteName; t.TagType = "What"; if (Convert.ToInt32(Whatnewtags[i].Split(',')[1]) == 0) { bltag.AddTag(t); } else { bltag.AssociateTag(t); } } } } if (hdnWheretag.Value != null && hdnWheretag.Value.ToString() != "") { string[] Whereoldtags = ViewState["Wheretags"].ToString().Split('|'); string[] Wherenewtags = hdnWheretag.Value.Split('|'); for (int i = 1; i < Wherenewtags.Length; i++) { if (Convert.ToInt64(Wherenewtags[i].Split(',')[2]) == 1) { t = new DtoTag(); t.TagId = Convert.ToInt64(Wherenewtags[i].Split(',')[1]); t.TagName = Wherenewtags[i].Split(',')[0]; t.Link = Premalink; t.WebsiteName = WebsiteName; t.TagType = "Where"; if (Convert.ToInt64(Wherenewtags[i].Split(',')[1]) == 0) { bltag.AddTag(t); } else { bltag.AssociateTag(t); } } } } if (hdnWhentag.Value != null && hdnWhentag.Value.ToString() != "") { string[] Whenoldtags = ViewState["Whentags"].ToString().Split('|'); string[] Whennewtags = hdnWhentag.Value.Split('|'); for (int i = 1; i < Whennewtags.Length; i++) { if (Convert.ToInt64(Whennewtags[i].Split(',')[2]) == 1) { t = new DtoTag(); t.TagId = Convert.ToInt64(Whennewtags[i].Split(',')[1]); t.TagName = Whennewtags[i].Split(',')[0]; t.Link = Premalink; t.WebsiteName = WebsiteName; t.TagType = "When"; if (Convert.ToInt64(Whennewtags[i].Split(',')[1]) == 0) { bltag.AddTag(t); } else { bltag.AssociateTag(t); } } } } if (hdnWhotag.Value != null && hdnWhotag.Value.ToString() != "") { string[] Whooldtags = ViewState["Whotags"].ToString().Split('|'); string[] Whonewtags = hdnWhotag.Value.Split('|'); for (int i = 1; i < Whonewtags.Length; i++) { if (Convert.ToInt64(Whonewtags[i].Split(',')[2]) == 1) { t = new DtoTag(); t.TagId = Convert.ToInt64(Whonewtags[i].Split(',')[1]); t.TagName = Whonewtags[i].Split(',')[0]; t.Link = Premalink; t.WebsiteName = WebsiteName; t.TagType = "Who"; if (Convert.ToInt64(Whonewtags[i].Split(',')[1]) == 0) { bltag.AddTag(t); } else { bltag.AssociateTag(t); } } } } if (hdnHowtag.Value != null && hdnHowtag.Value.ToString() != "") { string[] Howoldtags = ViewState["Howtags"].ToString().Split('|'); string[] Hownewtags = hdnHowtag.Value.Split('|'); for (int i = 1; i < Hownewtags.Length; i++) { if (Convert.ToInt64(Hownewtags[i].Split(',')[2]) == 1) { t = new DtoTag(); t.TagId = Convert.ToInt64(Hownewtags[i].Split(',')[1]); t.TagName = Hownewtags[i].Split(',')[0]; t.Link = Premalink; t.WebsiteName = WebsiteName; t.TagType = "How"; if (Convert.ToInt64(Hownewtags[i].Split(',')[1]) == 0) { bltag.AddTag(t); } else { bltag.AssociateTag(t); } } } } if (hdnWhytag.Value != null && hdnWhytag.Value.ToString() != "") { string[] Whyoldtags = ViewState["Whytags"].ToString().Split('|'); string[] Whynewtags = hdnWhytag.Value.Split('|'); for (int i = 1; i < Whynewtags.Length; i++) { if (Convert.ToInt64(Whynewtags[i].Split(',')[2]) == 1) { t = new DtoTag(); t.TagId = Convert.ToInt64(Whynewtags[i].Split(',')[1]); t.TagName = Whynewtags[i].Split(',')[0]; t.Link = Premalink; t.WebsiteName = WebsiteName; t.TagType = "Why"; if (Convert.ToInt64(Whynewtags[i].Split(',')[1]) == 0) { bltag.AddTag(t); } else { bltag.AssociateTag(t); } } } } } catch (Exception ex) { ex.ToExceptionless().Submit(); } }