protected void Page_Load(object sender, EventArgs e) { string TempDiggID = Request.QueryString["i"]; DiggID = Convert.ToInt32(TempDiggID); isDetailPage = url.IndexOf("detail.aspx"); using (varDbConn.conn) { varDbConn.conn.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = varDbConn.conn; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = varConst.cSP_GetTags; cmd.Parameters.Add("@SelectNum", SqlDbType.Int); cmd.Parameters["@SelectNum"].Value = 10; cmd.Parameters.Add("@DiggID", SqlDbType.Int); cmd.Parameters["@DiggID"].Value = 0; cmd.Parameters.Add("@SiteName", SqlDbType.VarChar, 50); cmd.Parameters["@SiteName"].Value = varConst.cSiteName; using (SqlDataReader Tags = cmd.ExecuteReader()) { TagList.DataSource = Tags; TagList.DataBind(); } } }
/// <summary> /// Load the tags for the current blog into this control /// </summary> protected virtual void LoadTags() { if (!TagCloudCore.Tags.Any() || MaximumCount <= 0) { if (PanelTagCloud != null) { PanelTagCloud.Visible = false; } } else { if (TagList != null) { TagList.DataSource = TagCloudCore.Tags.Take(MaximumCount); TagList.DataBind(); } } }
/// <summary> /// Load the tags for the current blog into this control /// </summary> protected virtual void LoadTags() { if (ManagerFactory.TagManagerInstance.GetAllTags().Count == 0) { if (PanelTagCloud != null) { PanelTagCloud.Visible = false; } } else { var tags = ManagerFactory.TagManagerInstance.GetAllTags(); m_min = (from tag in tags select tag.Value).Min(); m_max = (from tag in tags select tag.Value).Max(); if (TagList != null) { TagList.DataSource = tags; TagList.DataBind(); } } }