本文整理汇总了C#中PlaceHolder类的典型用法代码示例。如果您正苦于以下问题:C# PlaceHolder类的具体用法?C# PlaceHolder怎么用?C# PlaceHolder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PlaceHolder类属于命名空间,在下文中一共展示了PlaceHolder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: grdEmpl_Itemcommand
public void grdEmpl_Itemcommand(Object sender, DataGridCommandEventArgs e)
{
String loginid = "";
DataSet dsExpand = new DataSet();
WhitfieldPayroll _dbClass = new WhitfieldPayroll();
switch (e.CommandName)
{
case "Expand":
{
loginid = Convert.ToString(grdEmpl.DataKeys[e.Item.ItemIndex]);
dsExpand = _dbClass.GetPayRollProjectHoursForEmployee(loginid, txtFromDate.Text.Trim(), txtToDate.Text.Trim());
PlaceHolder exp = new PlaceHolder();
exp = (System.Web.UI.WebControls.PlaceHolder)e.Item.Cells[7].FindControl("ExpandedContent");
ImageButton img = new ImageButton();
img = (System.Web.UI.WebControls.ImageButton)e.Item.Cells[0].FindControl("btnExpand");
if (dsExpand.Tables[0].Rows.Count > 0)
{
if (img.ImageUrl == "assets/img/Plus.gif")
{
img.ImageUrl = "assets/img/Minus.gif";
exp.Visible = true;
((Whitfield_Payroll_ByProject)(e.Item.FindControl("DynamicTable1"))).Visible = true;
((Whitfield_Payroll_ByProject)(e.Item.FindControl("DynamicTable1"))).DisplayGrid(loginid, txtFromDate.Text.Trim(), txtToDate.Text.Trim());
}
else
{
exp.Visible = false;
((Whitfield_Payroll_ByProject)(e.Item.FindControl("DynamicTable1"))).Visible = false;
img.ImageUrl = "assets/img/Plus.gif";
}
}
else
{
if (img.ImageUrl == "assets/img/Plus.gif")
{
//((ViewDesignAdmin)(e.Item.FindControl("DynamicTable1"))).Visible = true;
img.ImageUrl = "assets/img/Minus.gif";
exp.Visible = true;
((Whitfield_Payroll_ByProject)(e.Item.FindControl("DynamicTable1"))).Visible = true;
((Whitfield_Payroll_ByProject)(e.Item.FindControl("DynamicTable1"))).DisplayGrid(loginid, txtFromDate.Text.Trim(), txtToDate.Text.Trim());
}
else
{
exp.Visible = false;
((Whitfield_Payroll_ByProject)(e.Item.FindControl("DynamicTable1"))).Visible = false;
img.ImageUrl = "assets/img/Plus.gif";
}
}
break;
}
default:
{
break;
}
}
}
开发者ID:frdharish,项目名称:WhitfieldAPPs,代码行数:60,代码来源:whitfield_payroll.aspx.cs
示例2: AddControls
public void AddControls(
string strXML,
PlaceHolder plaPlaceHolder,
Page pagMain)
{
AddControls(strXML, plaPlaceHolder, pagMain, true);
}
开发者ID:0huah0,项目名称:csharp-samples,代码行数:7,代码来源:XMLCoverter.cs
示例3: setMessage
public static void setMessage(PlaceHolder placeholder, string message, string level)
{
placeholder.Controls.Add(new LiteralControl(
"<div class='alert alert-"+level+" col-sm-10 col-sm-offset-1'>"
+ message
+ "</div>"));
}
开发者ID:hareluya86,项目名称:ProjectPortal,代码行数:7,代码来源:Messenger.cs
示例4: Render
public string Render(PlaceHolder placeHolder, PageEntry pageEntry, System.Xml.XmlDocument content, Stack<string> placeHolderStack, out bool containsCacheableContent)
{
string output;
switch (placeHolder.Expression.ToLower())
{
case "subscribe":
output = ResourceLoader.LoadTextResource("Sprocket.Web.CMS.Pages.Widgets.Newsletter.newsletter-subscribe.htm")
.Replace("[blurb]", GeneralRegistry.XmlDoc.SelectSingleNode("/General/Newsletter/SubscribeBlurb").FirstChild.Value)
.Replace("[label]", GeneralRegistry.XmlDoc.SelectSingleNode("/General/Newsletter/EmailFieldLabel").FirstChild.Value)
.Replace("[button]", GeneralRegistry.XmlDoc.SelectSingleNode("/General/Newsletter/SubscribeButtonText").FirstChild.Value)
.Replace("[pleasewait]", GeneralRegistry.XmlDoc.SelectSingleNode("/General/Newsletter/SubscribingBlurb").FirstChild.Value)
.Replace("[subscribed]", GeneralRegistry.XmlDoc.SelectSingleNode("/General/Newsletter/SubscribedBlurb").FirstChild.Value)
;
break;
case "unsubscribe":
output = ResourceLoader.LoadTextResource("Sprocket.Web.CMS.Pages.Widgets.Newsletter.newsletter-unsubscribe.htm")
.Replace("[blurb]", GeneralRegistry.XmlDoc.SelectSingleNode("/General/Newsletter/UnsubscribeBlurb").FirstChild.Value)
.Replace("[label]", GeneralRegistry.XmlDoc.SelectSingleNode("/General/Newsletter/EmailFieldLabel").FirstChild.Value)
.Replace("[button]", GeneralRegistry.XmlDoc.SelectSingleNode("/General/Newsletter/UnsubscribeButtonText").FirstChild.Value)
.Replace("[pleasewait]", GeneralRegistry.XmlDoc.SelectSingleNode("/General/Newsletter/UnsubscribingBlurb").FirstChild.Value)
.Replace("[unsubscribed]", GeneralRegistry.XmlDoc.SelectSingleNode("/General/Newsletter/UnsubscribedBlurb").FirstChild.Value)
;
break;
default:
containsCacheableContent = false;
return "[Newsletter renderer expects expression of \"Subscribe\" or \"Unsubscribe\"]";
}
containsCacheableContent = true;
return output;
}
开发者ID:priaonehaha,项目名称:sprocketcms,代码行数:33,代码来源:NewsletterPlaceHolderRenderer.cs
示例5: InstantiateIn
public void InstantiateIn(Control container)
{
PlaceHolder templatePlaceHolder = new PlaceHolder();
container.Controls.Add(templatePlaceHolder);
templatePlaceHolder.DataBinding += new EventHandler(DataBindTemplate);
}
开发者ID:veraveramanolo,项目名称:power-show,代码行数:7,代码来源:cs_ondemand_virtual_scroll.aspx.cs
示例6: initPage
/// <summary>
/// 初始化页面
/// </summary>
/// <param name="thepage">当前页面对象</param>
/// <param name="index">页面菜单索引</param>
/// <param name="title">页面标题</param>
/// <param name="plhdTitle">标题控件</param>
/// <param name="plhdHeader">头部控件</param>
/// <param name="plhdSlide">侧栏控件</param>
/// <param name="plhdFooter">底部控件</param>
public static void initPage(Page thepage, int index, string title, PlaceHolder plhdTitle, PlaceHolder plhdHeader, PlaceHolder plhdSlide, PlaceHolder plhdFooter)
{
string titleID = "u_title";
string headerID = "u_header";
string sliderID = "u_slider";
string footerID = "u_footer";
//get menu name
string menuName = "menu" + index;
string subMenuName = "subMenu" + index;
//get title
Control ctitle = thepage.LoadControl("pageControl/title.ascx");
ctitle.ID = titleID;
(ctitle.FindControl("ltrTitle") as Literal).Text = title;
plhdTitle.Controls.Add(ctitle);
//get header
Control cheader = thepage.LoadControl("pageControl/header.ascx");
cheader.ID = headerID;
(cheader.FindControl(menuName) as Literal).Text = " class=\"current\"";//高亮父菜单
cheader.FindControl(subMenuName).Visible = true;//高亮子菜单
plhdHeader.Controls.Add(cheader);
//get slider
Control cslider = thepage.LoadControl("pageControl/slidePanel.ascx");
cslider.ID = sliderID;
plhdSlide.Controls.Add(cslider);
//get footer
Control cfooter = thepage.LoadControl("pageControl/footer.ascx");
cfooter.ID = footerID;
plhdFooter.Controls.Add(cfooter);
}
开发者ID:TheProjecter,项目名称:wgiadunion,代码行数:44,代码来源:uLoadControl.cs
示例7: LoadSelectedControl
private void LoadSelectedControl(string entityId, Dictionary<string, string> selectorList)
{
Dictionary<string, PlaceHolder> placeholderList = new Dictionary<string, PlaceHolder>();
foreach (KeyValuePair<string, string> kvp1 in selectorList)
{
PlaceHolder p = new PlaceHolder();
Settings.Controls.Add(p);
placeholderList.Add(kvp1.Key, p);
}
//List<string> paths = new List<string>();
BXCommand command = new BXCommand("Bitrix.Main.OnGlobalOptionsEdit");
//command.FilterListeners = new string[] { entityId };
command.Parameters.Add("EntityId", entityId);
command.Send();
BXCommandResult r;
if (command.CommandResultDictionary.TryGetValue(entityId, out r) && r.CommandResult == BXCommandResultType.Ok)
{
string path = r.Result.ToString();
if (File.Exists(BXPath.MapPath(path)))
{
Control ctrl = LoadControl(path);
placeholderList[entityId].Controls.Add(ctrl);
}
}
}
开发者ID:mrscylla,项目名称:volotour.ru,代码行数:28,代码来源:Settings.aspx.cs
示例8: GetID
public long GetID( ObjectIDGenerator IDGen )
{
PlaceHolder p = new PlaceHolder();
p.holder = 0;
bool temp;
lock (p) {
return IDGen.GetId(p, out temp); }
}
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:8,代码来源:syncblock.cs
示例9: OnAuctionTypeReached
protected void OnAuctionTypeReached(
PlaceHolder plaPlaceHolder)
{
if (AuctionTypeReached != null)
{
AuctionTypeReached(plaPlaceHolder);
}
}
开发者ID:0huah0,项目名称:csharp-samples,代码行数:8,代码来源:XMLCoverter.cs
示例10: conConverter_AuctionTypeReached
void conConverter_AuctionTypeReached(PlaceHolder plaPlaceHolder)
{
Controls_AuctionBidSummary absSummary =
(Controls_AuctionBidSummary)LoadControl("AuctionBidSummary.ascx");
absSummary.PlaceBidClick += absSummary_PlaceBidClick;
plaPlaceHolder.Controls.Add(absSummary);
Controls_AuctionBidSummary.PopulateBidSummary(absSummary, m_dasAuction);
}
开发者ID:0huah0,项目名称:csharp-samples,代码行数:9,代码来源:AuctionDetail.aspx.cs
示例11: display
public override void display(PlaceHolder p)
{
p.Controls.Add(base.l);
p.Controls.Add(new LiteralControl("<br />"));
p.Controls.Add(rbl);
p.Controls.Add(base.fl); p.Controls.Add(base.fh);
p.Controls.Add(new LiteralControl("<br />"));
p.Controls.Add(new LiteralControl("<br />"));
}
开发者ID:vlad-,项目名称:InfoBac,代码行数:9,代码来源:ChoiceQuestion.cs
示例12: InstantiateIn
public void InstantiateIn(Control container)
{
PlaceHolder templatePlaceHolder = new PlaceHolder();
container.Controls.Add(templatePlaceHolder);
Literal divContainer = new Literal();
divContainer.Text = "<div id=\"gridContainer\">";
Obout.Grid.Grid grid1 = new Obout.Grid.Grid();
grid1.ID = "Grid1";
grid1.DataSourceID = "SqlDataSource1";
grid1.AutoGenerateColumns = false;
grid1.AllowPaging = false;
grid1.AllowPageSizeSelection = false;
grid1.AllowSorting = false;
grid1.PageSize = -1;
grid1.AllowMultiRecordSelection = false;
grid1.AllowAddingRecords = false;
grid1.ClientSideEvents.ExposeSender = true;
grid1.ClientSideEvents.OnClientSelect = "Grid1_Select";
Obout.Grid.Column oCol1 = new Obout.Grid.Column();
oCol1.DataField = "CustomerID";
oCol1.Visible = false;
oCol1.HeaderText = "CUSTOMER";
Obout.Grid.Column oCol2 = new Obout.Grid.Column();
oCol2.DataField = "CompanyName";
oCol2.HeaderText = "NAME";
Obout.Grid.Column oCol3 = new Obout.Grid.Column();
oCol3.DataField = "City";
oCol3.HeaderText = "CITY";
Obout.Grid.Column oCol4 = new Obout.Grid.Column();
oCol4.DataField = "Country";
oCol4.HeaderText = "COUNTRY";
grid1.Columns.Add(oCol1);
grid1.Columns.Add(oCol2);
grid1.Columns.Add(oCol3);
grid1.Columns.Add(oCol4);
grid1.ScrollingSettings.ScrollHeight = 175;
grid1.PagingSettings.ShowRecordsCount = false;
Literal divContainer2 = new Literal();
divContainer2.Text = "</div>";
templatePlaceHolder.Controls.Add(divContainer);
templatePlaceHolder.Controls.Add(grid1);
templatePlaceHolder.Controls.Add(divContainer2);
}
开发者ID:veraveramanolo,项目名称:power-show,代码行数:54,代码来源:cs_integration_grid_inside.aspx.cs
示例13: InstantiateIn
public void InstantiateIn(System.Web.UI.Control container)
{
PlaceHolder ph = new PlaceHolder();
Label label1 = new Label();
label1.ID = "Label1";
label1.Text = "A full page postback occurred.";
Button button1 = new Button();
button1.ID = "Button1";
button1.Text = "Refresh Panel";
button1.Click += new EventHandler(button1_Click);
ph.Controls.Add(label1);
ph.Controls.Add(new LiteralControl("<br/>"));
ph.Controls.Add(button1);
container.Controls.Add(ph);
}
开发者ID:nobled,项目名称:mono,代码行数:15,代码来源:CustomContentTemplate.cs
示例14: TemplateRegexParser
// �R���X�g���N�^
public TemplateRegexParser(EcmProject proj, EcmLog log, string templateName)
{
myProject = proj;
myLog = log;
myTemplateName = templateName;
myPlaceHolderSets["{num}"] = new PlaceHolder("num", "-?[0-9]*", "-100");
myPlaceHolderSets["{num+}"] = new PlaceHolder("num", "-?[0-9]+", "-100");
myPlaceHolderSets["{uri}"] = new PlaceHolder("uri", "[-._~;?:@&=*+&,/#\\[\\]()a-zA-Z0-9]*", "#");
myPlaceHolderSets["{uri+}"] = new PlaceHolder("uri", "[-._~;?:@&=*+&,/#\\[\\]()a-zA-Z0-9]*", "#");
myPlaceHolderSets["{text}"] = new PlaceHolder("text", "[^\\n<]*", "�e�L�X�g�e�L�X�g�e�L�X�g");
myPlaceHolderSets["{text+}"] = new PlaceHolder("text", "[^\\n<]+", "�e�L�X�g�e�L�X�g�e�L�X�g");
myPlaceHolderSets["{any}"] = new PlaceHolder("any", ".*", "??????????");
myPlaceHolderSets["{any+}"] = new PlaceHolder("any", ".+", "??????????");
}
开发者ID:bakera,项目名称:ECCM,代码行数:16,代码来源:templateregexparser.cs
示例15: CreateEditCountryTemplate
public void CreateEditCountryTemplate(Object sender, Obout.Grid.GridRuntimeTemplateEventArgs e)
{
PlaceHolder oPlaceHolder = new PlaceHolder();
e.Container.Controls.Add(oPlaceHolder);
Obout.ComboBox.ComboBox ComboBox1 = new Obout.ComboBox.ComboBox();
ComboBox1.ID = "ComboBox1";
ComboBox1.Height = 100;
ComboBox1.Width = Unit.Percentage(100);
ComboBox1.DataSourceID = "SqlDataSource2";
ComboBox1.DataTextField = "CountryName";
ComboBox1.AppendDataBoundItems = false;
ComboBox1.DataValueField = "CountryName";
oPlaceHolder.Controls.Add(ComboBox1);
}
开发者ID:veraveramanolo,项目名称:power-show,代码行数:16,代码来源:cs_integration_grid.aspx.cs
示例16: InstantiateIn
public void InstantiateIn(Control container)
{
PlaceHolder templatePlaceHolder = new PlaceHolder();
container.Controls.Add(templatePlaceHolder);
Literal id = new Literal();
id.Text = "<div class=\"header c1\">ID</div>";
Literal companyname = new Literal();
companyname.Text = "<div class=\"header c2\">COMPANY NAME</div>";
Literal city = new Literal();
city.Text = "<div class=\"header c3\">CITY</div>";
templatePlaceHolder.Controls.Add(id);
templatePlaceHolder.Controls.Add(companyname);
templatePlaceHolder.Controls.Add(city);
}
开发者ID:veraveramanolo,项目名称:power-show,代码行数:16,代码来源:cs_apiclient_items_columns.aspx.cs
示例17: InstantiateIn
public void InstantiateIn(Control container)
{
PlaceHolder templatePlaceHolder = new PlaceHolder();
container.Controls.Add(templatePlaceHolder);
Obout.ListBox.ListBox listBox1 = new Obout.ListBox.ListBox();
templatePlaceHolder.Controls.Add(listBox1);
listBox1.ID = "ShipCountry";
listBox1.DataSourceID = "SqlDataSource2";
listBox1.Width = Unit.Percentage(100);
listBox1.Height = Unit.Pixel(150);
listBox1.DataValueField = "ShipCountry";
listBox1.DataTextField = "ShipCountry";
templatePlaceHolder.DataBinding += new EventHandler(DataBindTemplate);
}
开发者ID:veraveramanolo,项目名称:power-show,代码行数:17,代码来源:cs_templates_listbox.aspx.cs
示例18: CreateCountryTemplate
public void CreateCountryTemplate(Object sender, Obout.Grid.GridRuntimeTemplateEventArgs e)
{
PlaceHolder ph1 = new PlaceHolder();
e.Container.Controls.Add(ph1);
ComboBox comboBox = new ComboBox();
comboBox.ID = "ComboBox1";
comboBox.Width = Unit.Percentage(100);
comboBox.Height = Unit.Pixel(200);
comboBox.DataTextField = "CountryName";
comboBox.DataValueField = "CountryName";
comboBox.EmptyText = "Select a country ...";
comboBox.EnableLoadOnDemand = true;
comboBox.LoadingItems += ComboBox1_LoadingItems;
ph1.Controls.Add(comboBox);
}
开发者ID:veraveramanolo,项目名称:power-show,代码行数:17,代码来源:cs_integration_combobox_ondemand.aspx.cs
示例19: InstantiateIn
public void InstantiateIn(Control container)
{
PlaceHolder templatePlaceHolder = new PlaceHolder();
container.Controls.Add(templatePlaceHolder);
templatePlaceHolder.DataBinding += new EventHandler(DataBindTemplate);
Literal cont11 = new Literal();
cont11.Text = "<div class=\"item c1\">";
Literal Container1 = new Literal();
Container1.ID = "Container1";
Literal cont12 = new Literal();
cont12.Text = "</div>";
Literal cont21 = new Literal();
cont21.Text = "<div class=\"item c2\">";
Literal Container2 = new Literal();
Container2.ID = "Container2";
Literal cont22 = new Literal();
cont22.Text = "</div>";
Literal cont31 = new Literal();
cont31.Text = "<div class=\"item c3\">";
Literal Container3 = new Literal();
Container3.ID = "Container3";
Literal cont32 = new Literal();
cont32.Text = "</div>";
templatePlaceHolder.Controls.Add(cont11);
templatePlaceHolder.Controls.Add(Container1);
templatePlaceHolder.Controls.Add(cont12);
templatePlaceHolder.Controls.Add(cont21);
templatePlaceHolder.Controls.Add(Container2);
templatePlaceHolder.Controls.Add(cont22);
templatePlaceHolder.Controls.Add(cont31);
templatePlaceHolder.Controls.Add(Container3);
templatePlaceHolder.Controls.Add(cont32);
}
开发者ID:veraveramanolo,项目名称:power-show,代码行数:45,代码来源:cs_apiserver_get_values.aspx.cs
示例20: InstantiateIn
public void InstantiateIn(Control container)
{
PlaceHolder templatePlaceHolder = new PlaceHolder();
container.Controls.Add(templatePlaceHolder);
Obout.Ajax.UI.HTMLEditor.Editor editor1 = new Obout.Ajax.UI.HTMLEditor.Editor();
templatePlaceHolder.Controls.Add(editor1);
editor1.ID = "Editor1";
editor1.TopToolbar.Appearance = Obout.Ajax.UI.HTMLEditor.EditorTopToolbar.AppearanceType.Lite;
editor1.EditPanel.ContextMenu.Style[HtmlTextWriterStyle.ZIndex] = "3000";
editor1.Width = 550;
editor1.Height = 300;
templatePlaceHolder.DataBinding += new EventHandler(DataBindTemplate);
}
开发者ID:veraveramanolo,项目名称:power-show,代码行数:18,代码来源:cs_templates_editor.aspx.cs
注:本文中的PlaceHolder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论