protected override void RenderItem(System.Web.UI.WebControls.ListItemType itemType, int repeatIndex, System.Web.UI.WebControls.RepeatInfo repeatInfo, System.Web.UI.HtmlTextWriter writer) { //If String.IsNullOrEmpty(Me.Items(repeatIndex).Value) Then // writer.AddAttribute("onclick", "CheckBoxList_SetAll('" & ClientID & "', " & Items.Count.ToString() & ", this.checked);") //End If base.RenderItem(itemType, repeatIndex, repeatInfo, writer); }
protected void Repeater2_ItemDataBound(object sender, RepeaterItemEventArgs e) { System.Web.UI.WebControls.ListItemType lit = e.Item.ItemType; if (lit == System.Web.UI.WebControls.ListItemType.Item || lit == System.Web.UI.WebControls.ListItemType.AlternatingItem) { System.Data.DataRowView drv = (System.Data.DataRowView)e.Item.DataItem; Label lablabImage = (Label)e.Item.FindControl("lablabImage"); lablabImage.Text = "<a href='../PartnerTemplates/default.aspx?id=" + drv["PartnerGUID"].ToString() + "' target='_blank'><img style='border:0px;' src='" + drv["PartnerLogo"].ToString().Split('~')[1] + "' alt='" + drv["PartnerName"].ToString() + "' title='" + drv["PartnerName"].ToString() + "' /></a>"; } }
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { System.Web.UI.WebControls.ListItemType lit = e.Item.ItemType; if (lit == System.Web.UI.WebControls.ListItemType.Item || lit == System.Web.UI.WebControls.ListItemType.AlternatingItem) { System.Data.DataRowView drv = (System.Data.DataRowView)e.Item.DataItem; Label labHotPost = (Label)e.Item.FindControl("labHotPost"); labHotPost.Text = "<a href='SearchResultList.aspx?id=" + Server.UrlEncode(drv["JobKindName"].ToString()) + "' style='color:#fff;text-decoration:none;'>" + drv["JobKindName"].ToString() + "</a>"; } }
//protected void DataList2_ItemDataBound(object sender, DataListItemEventArgs e) //{ // if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) // { // System.Data.DataRowView drv = (System.Data.DataRowView)e.Item.DataItem; // Label labLinksText = (Label)e.Item.FindControl("labLinksText"); // labLinksText.Text = "<a class='huia' style='color:#304874;' href='" + drv["LinkTarget"].ToString() + "' target='_blank' title='" + drv["LinkTitle"].ToString() + "'>" + drv["LinkTitle"].ToString() + "</a>"; // } //} protected void repLinks_ItemDataBound(object sender, RepeaterItemEventArgs e) { System.Web.UI.WebControls.ListItemType lit = e.Item.ItemType; if (lit == System.Web.UI.WebControls.ListItemType.Item || lit == System.Web.UI.WebControls.ListItemType.AlternatingItem) { System.Data.DataRowView drv = (System.Data.DataRowView)e.Item.DataItem; Label labLinksText = (Label)e.Item.FindControl("labLinksText"); labLinksText.Text = "<a class='huia' style='color:#304874;' href='" + drv["LinkTarget"].ToString() + "' target='_blank' title='" + drv["LinkTitle"].ToString() + "'>" + drv["LinkTitle"].ToString() + "</a>"; } }
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { System.Web.UI.WebControls.ListItemType lit = e.Item.ItemType; if (lit == System.Web.UI.WebControls.ListItemType.Item || lit == System.Web.UI.WebControls.ListItemType.AlternatingItem) { System.Data.DataRowView drv = (System.Data.DataRowView)e.Item.DataItem; Label labNewsDate = (Label)e.Item.FindControl("labNewsDate"); Label labNewsTitle = (Label)e.Item.FindControl("labNewsTitle"); labNewsDate.Text = DateTime.Parse(drv["PublishDate"].ToString()).ToString("yyyy年MM月dd日"); labNewsTitle.Text = "<a href='EnterpriseNewsInfo.aspx?id=" + drv["NewsGUID"].ToString() + "' class='huia'><img src='../Resources/images/nnew.gif' style='border:0px;' width='22' height='9' border='0' /> " + Set_NewsTitleLength(drv["NewsTitle"].ToString()) + "</a>"; } }
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { System.Web.UI.WebControls.ListItemType lit = e.Item.ItemType; if (lit == System.Web.UI.WebControls.ListItemType.Item || lit == System.Web.UI.WebControls.ListItemType.AlternatingItem) { System.Data.DataRowView drv = (System.Data.DataRowView)e.Item.DataItem; Label labLogoImage = (Label)e.Item.FindControl("labLogoImage"); Label labEnterpriseName = (Label)e.Item.FindControl("labEnterpriseName"); Label labEnterpriseContent = (Label)e.Item.FindControl("labEnterpriseContent"); labLogoImage.Text = "<a href='../PartnerTemplates/default.aspx?id=" + drv["PartnerGUID"].ToString() + "' target='_blank'><img style='border:0px;' alt='' title='' src='" + drv["PartnerLogo"].ToString().Split('~')[1] + "' /></a>"; labEnterpriseName.Text = "<a class='huia' target='_blank' href='../PartnerTemplates/default.aspx?id=" + drv["PartnerGUID"].ToString() + "'>" + drv["PartnerName"].ToString() + "</a>"; labEnterpriseContent.Text = Set_PartnerIntroductionLength(drv["PartnerIntroduction"].ToString()) + " ...<a class='huia' style='color:#F26200;' href='../PartnerTemplates/default.aspx?id=" + drv["PartnerGUID"].ToString() + "' target='_blank'>查看</a>"; } }
public void RenderItem(System.Web.UI.WebControls.ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer) { this.controlToRepeat.ID = repeatIndex.ToString(NumberFormatInfo.InvariantInfo); this.controlToRepeat.Text = this.Items[repeatIndex].Text; this.controlToRepeat.TextAlign = this.TextAlign; this.controlToRepeat.Checked = this.Items[repeatIndex].Selected; this.controlToRepeat.Enabled = this.Enabled; this.controlToRepeat.Attributes.Clear(); foreach (string key in this.Items[repeatIndex].Attributes.Keys) { this.controlToRepeat.Attributes.Add(key, this.Items[repeatIndex].Attributes[key]); } this.controlToRepeat.RenderControl(writer); }
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { System.Web.UI.WebControls.ListItemType lit = e.Item.ItemType; if (lit == System.Web.UI.WebControls.ListItemType.Item || lit == System.Web.UI.WebControls.ListItemType.AlternatingItem) { System.Data.DataRowView drv = (System.Data.DataRowView)e.Item.DataItem; Label labImage = (Label)e.Item.FindControl("labImage"); Label labContent = (Label)e.Item.FindControl("labContent"); labImage.Text = "<img src='" + drv["VentureStarImage"].ToString().Split('~')[1] + "' alt='" + Get_StoreName(drv["DictionaryKey"].ToString()) + " " + drv["VentureStarName"].ToString() + "'/>"; labContent.Text = "<p>姓名:" + drv["VentureStarName"].ToString() + "</p><p style='margin-bottom:10px;margin-top:10px;'>所在店面:" + Get_StoreName(drv["DictionaryKey"].ToString()) + "</p><p style='margin-bottom:10px;margin-top:10px;'>明星介绍:" + drv["VentureStarContent"].ToString() + "</p>"; } }
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { System.Web.UI.WebControls.ListItemType lit = e.Item.ItemType; if (lit == System.Web.UI.WebControls.ListItemType.Item || lit == System.Web.UI.WebControls.ListItemType.AlternatingItem) { System.Data.DataRowView drv = (System.Data.DataRowView)e.Item.DataItem; Label labPublishDate = (Label)e.Item.FindControl("labPublishDate"); Label labJobTitle = (Label)e.Item.FindControl("labJobTitle"); labPublishDate.Text = DateTime.Parse(drv["CreateTime"].ToString()).ToString("yyyy年MM月dd日"); string strEnterpriseID = drv["EnterpriseJobGuid"].ToString(); string strEnterpriseName = Set_EnterpriseNameLength(drv["EnterpriseName"].ToString()); labJobTitle.Text = "<a title='" + drv["EnterpriseName"].ToString() + "' href='OnlineApplicationInfo.aspx?id=" + strEnterpriseID + "' class='huia'>" + strEnterpriseName + "</a> / <a title='" + Set_PostInfoLength(drv["EnterpriseJobStation"].ToString()) + "' href='OnlineApplicationInfo.aspx?id=" + strEnterpriseID + "' class='huia'>" + drv["EnterpriseJobStation"].ToString() + "</a> / <a href='OnlineApplicationInfo.aspx?id=" + strEnterpriseID + "' class='huia'>" + drv["EnterpriseJobLaborCount"].ToString() + "人</a>"; } }
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { System.Web.UI.WebControls.ListItemType lit = e.Item.ItemType; if (lit == System.Web.UI.WebControls.ListItemType.Item || lit == System.Web.UI.WebControls.ListItemType.AlternatingItem) { System.Data.DataRowView drv = (System.Data.DataRowView)e.Item.DataItem; Label labPublishDate = (Label)e.Item.FindControl("labPublishDate"); Label labContent = (Label)e.Item.FindControl("labContent"); Label labReplyPublish = (Label)e.Item.FindControl("labReplyPublish"); Label labReplyContent = (Label)e.Item.FindControl("labReplyContent"); labPublishDate.Text = DateTime.Parse(drv["PublishDate"].ToString()).ToString("yyyy年MM月dd日"); labContent.Text = drv["PublishContent"].ToString(); labReplyPublish.Text = DateTime.Parse(drv["ReplyDate"].ToString()).ToString("yyyy年MM月dd日"); labReplyContent.Text = drv["ReplyContent"].ToString(); } }
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { System.Web.UI.WebControls.ListItemType lit = e.Item.ItemType; if (lit == System.Web.UI.WebControls.ListItemType.Item || lit == System.Web.UI.WebControls.ListItemType.AlternatingItem) { System.Data.DataRowView drv = (System.Data.DataRowView)e.Item.DataItem; Label labPingBi = (Label)e.Item.FindControl("labPingBi"); if (nRowIndex % 2 == 0) { labPingBi.Text = "<tr class='odd'><td>" + Get_StoreName(drv["DictionaryKey"].ToString()) + "</td><td>第 " + drv["StoreStatisticsOrder"].ToString() + " 名</td><td>" + Get_StoreName(drv["StoreDictionaryKey"].ToString()) + "</td><td>" + Convert_DateTime(drv["PublishDate"].ToString()) + "</td></tr>"; } else { labPingBi.Text = "<tr><td>" + Get_StoreName(drv["DictionaryKey"].ToString()) + "</td><td>第 " + drv["StoreStatisticsOrder"].ToString() + " 名</td><td>" + Get_StoreName(drv["StoreDictionaryKey"].ToString()) + "</td><td>" + Convert_DateTime(drv["PublishDate"].ToString()) + "</td></tr>"; } nRowIndex++; } }
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { System.Web.UI.WebControls.ListItemType lit = e.Item.ItemType; if (lit == System.Web.UI.WebControls.ListItemType.Item || lit == System.Web.UI.WebControls.ListItemType.AlternatingItem) { System.Data.DataRowView drv = (System.Data.DataRowView)e.Item.DataItem; Label labJobTitle = (Label)e.Item.FindControl("labJobTitle"); Label labPublishDate = (Label)e.Item.FindControl("labPublishDate"); Label labResponsibilities = (Label)e.Item.FindControl("labResponsibilities"); Label labQualifications = (Label)e.Item.FindControl("labQualifications"); Label labCheck = (Label)e.Item.FindControl("labCheck"); labJobTitle.Text = drv["DepartmentName"].ToString() + " " + drv["CareersTitle"].ToString() + " " + "人数: " + drv["CareersCount"].ToString() + "人"; labPublishDate.Text = DateTime.Parse(drv["PublishDate"].ToString()).ToString("yyyy年MM月dd日"); labResponsibilities.Text = drv["Responsibilities"].ToString(); labQualifications.Text = drv["Qualifications"].ToString(); labCheck.Text = "<a href='CareersInfo.aspx?id=" + drv["CareersGUID"].ToString() + "' style='color:#F26200; font-weight:bold;'>查看职位详情</a>"; } }
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { System.Web.UI.WebControls.ListItemType lit = e.Item.ItemType; if (lit == System.Web.UI.WebControls.ListItemType.Item || lit == System.Web.UI.WebControls.ListItemType.AlternatingItem) { System.Data.DataRowView drv = (System.Data.DataRowView)e.Item.DataItem; Label labPublishUserName = (Label)e.Item.FindControl("labPublishUserName"); Label labPublishDate = (Label)e.Item.FindControl("labPublishDate"); Label labPublishContent = (Label)e.Item.FindControl("labPublishContent"); Label labReplyUser = (Label)e.Item.FindControl("labReplyUser"); Label labReplyDate = (Label)e.Item.FindControl("labReplyDate"); Label labReplyContent = (Label)e.Item.FindControl("labReplyContent"); labPublishUserName.Text = drv["PublishUserName"].ToString(); //发布人姓名 labPublishDate.Text = DateTime.Parse(drv["PublishDate"].ToString()).ToString("yyyy年MM月dd日"); //发布日期 labPublishContent.Text = drv["PublishContent"].ToString(); //发布内容 labReplyUser.Text = Get_ReplyName(drv["ReplyUserGUID"].ToString()); //回复人 labReplyDate.Text = DateTime.Parse(drv["ReplyDate"].ToString()).ToString("yyyy年MM月dd日"); //回复日期 labReplyContent.Text = drv["ReplyContent"].ToString(); //回复内容 } }
/// <summary> /// Adds the <strong>onclick</strong> attribute to each item to invoke a callback from the client, /// then renders the item. /// </summary> protected override void RenderItem(ASP.ListItemType itemType, int repeatIndex, ASP.RepeatInfo repeatInfo, HtmlTextWriter writer) { if (AutoCallBack) { ASP.ListItem item = this.Items[repeatIndex]; if (item.Selected) { item.Attributes.Remove("onclick"); } else { item.Attributes["onclick"] = Anthem.Manager.GetCallbackEventReference( this, repeatIndex.ToString(), this.CausesValidation, this.ValidationGroup ); } } base.RenderItem(itemType, repeatIndex, repeatInfo, writer); }
public week1template(System.Web.UI.WebControls.ListItemType type) { templateType = type; }
internal SlidingPanelItem(int itemIndex, System.Web.UI.WebControls.ListItemType itemType) { _index = itemIndex; _ItemType = itemType; }
public MyTemplate1(System.Web.UI.WebControls.ListItemType type) { templateType = type; }
void IRepeatInfoUser.RenderItem(System.Web.UI.WebControls.ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer) { Boolean isWriteInItem = (this.Items[repeatIndex].Value == this.writeInItemValue); if (isWriteInItem && !this.AllowWriteInVote) { return; } #region Set up the write in textbox if needed TextBox writeInBox = null; if (isWriteInItem) { writeInBox = new TextBox(); this.Controls.Add(writeInBox); writeInBox.ID = "WriteIn"; writeInBox.Text = this.Items[repeatIndex].Text; writeInBox.Enabled = this.Enabled; writeInBox.Width = Unit.Percentage(100); if (writer is Html32TextWriter) { writeInBox.Attributes["size"] = "5"; } if (this.writeInTextBoxStyle != null) { writeInBox.ApplyStyle(this.writeInTextBoxStyle); } } #endregion #region Setup the voting control this.controlToRepeat.ID = repeatIndex.ToString(System.Globalization.NumberFormatInfo.InvariantInfo); this.controlToRepeat.TabIndex = controlToRepeatTabIndex; this.controlToRepeat.Enabled = this.Enabled; if (this.SelectionMode == VoteSelectionMode.Single || this.SelectionMode == VoteSelectionMode.Multiple) { CheckBox checkControl = (CheckBox)this.controlToRepeat; if (!isWriteInItem) { checkControl.Text = this.Items[repeatIndex].Text; checkControl.TextAlign = TextAlign.Right; ; } else { checkControl.Text = ""; } checkControl.Checked = this.Items[repeatIndex].Selected; } else { String itemRating = this.Items[repeatIndex].Attributes["rating"]; if (itemRating != null && itemRating.Length != 0) { DropDownList rateControl = (DropDownList)this.controlToRepeat; rateControl.SelectedValue = itemRating; } } if (this.SelectionMode == VoteSelectionMode.Single) { ((RadioButton)this.controlToRepeat).GroupName = this.UniqueID; this.controlToRepeat.Attributes["value"] = base.Items[repeatIndex].Value; } #endregion #region Render The Item if (isWriteInItem) { writer.Write("<table cellpadding='0' cellspacing='0' border='0' width='100%'><tr><td nowrap>"); this.controlToRepeat.RenderControl(writer); writer.Write("</td><td nowrap style='width:100%;padding-left:3px;padding-right:10px;'>"); writeInBox.RenderControl(writer); writer.Write("</td></tr></table>"); } else { this.controlToRepeat.RenderControl(writer); if (this.SelectionMode == VoteSelectionMode.Rating) { writer.Write(" "); writer.Write(base.Items[repeatIndex].Text); } } #endregion }
Style IRepeatInfoUser.GetItemStyle(System.Web.UI.WebControls.ListItemType itemType, int repeatIndex) { return(null); }
public MyTemplate(System.Web.UI.WebControls.ListItemType type, bool isteam = true) { templateType = type; repeaterIsTeam = isteam; }
public ActivityTemplate(System.Web.UI.WebControls.ListItemType type) { templateType = type; }
public Style GetItemStyle(System.Web.UI.WebControls.ListItemType itemType, int repeatIndex) { // TODO: Add CheckBoxList.GetItemStyle implementation return(null); }
public DynamicTemplate(System.Web.UI.WebControls.ListItemType type) { templateType = type; }