本文整理汇总了C#中System.Web.UI.WebControls.PlaceHolder类的典型用法代码示例。如果您正苦于以下问题:C# PlaceHolder类的具体用法?C# PlaceHolder怎么用?C# PlaceHolder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PlaceHolder类属于System.Web.UI.WebControls命名空间,在下文中一共展示了PlaceHolder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: loadBlog
public static void loadBlog(DataSet UserDataSet, PlaceHolder BlogHolder, string sort)
{
if (UserDataSet.Tables["Articles"].Rows.Count == 0)
{
BlogHolder.Controls.Add(new LiteralControl("<p>暂无文章</p>"));
}
else
{
DataRow[] dr = UserDataSet.Tables["Articles"].Select("", sort);
for (int i = 0; i < dr.Length; i++)
{
HyperLink articleTitle = new HyperLink();
articleTitle.ID = (i + 1).ToString() + "_Link";
articleTitle.Text = (i + 1).ToString() + "." + dr[i]["title"].ToString();
articleTitle.NavigateUrl = "UserBlog_ArticlesDetails.aspx?par_ArticleID=" + dr[i]["ID"].ToString();
articleTitle.Font.Size = 6;
articleTitle.Font.Bold = true;
BlogHolder.Controls.Add(new LiteralControl("<div style=\"margin-left:10px;margin-top:20px;margin-right:10px;border-bottom:1px dashed;\">"));
BlogHolder.Controls.Add(articleTitle);
BlogHolder.Controls.Add(new LiteralControl("</div>"));
}
}
}
开发者ID:BrefCool,项目名称:ITBLOGwebsite,代码行数:25,代码来源:UserBlog_ArticlesDetails.aspx.cs
示例2: gen
void gen(PlaceHolder Stats, Log.Items item)
{
Query q = new Query();
q.ExtraSelectElements.Add("Count", "SUM([Log].[Count])");
q.ExtraSelectElements.Add("Day", "DATENAME(DW,[Log].[Date])");
q.QueryCondition = new Q(Log.Columns.Item, item);
q.GroupBy = new GroupBy("DATENAME(DW,[Log].[Date])");
q.Columns = new ColumnSet();
LogSet ls = new LogSet(q);
Dictionary<DayOfWeek, double> weight = new Dictionary<DayOfWeek, double>();
int total = 0;
foreach (Log l in ls)
{
total += (int)l.ExtraSelectElements["Count"];
}
foreach (Log l in ls)
{
double fraction = (double)(int)l.ExtraSelectElements["Count"] / (double)total;
switch ((string)l.ExtraSelectElements["Day"])
{
case "Monday": weight[DayOfWeek.Monday] = fraction; break;
case "Tuesday": weight[DayOfWeek.Tuesday] = fraction; break;
case "Wednesday": weight[DayOfWeek.Wednesday] = fraction; break;
case "Thursday": weight[DayOfWeek.Thursday] = fraction; break;
case "Friday": weight[DayOfWeek.Friday] = fraction; break;
case "Saturday": weight[DayOfWeek.Saturday] = fraction; break;
case "Sunday": weight[DayOfWeek.Sunday] = fraction; break;
default: break;
}
}
Stats.Controls.Add(new LiteralControl("<table><tr><td>Month</td><td>Year</td><td>Weight</td><td>Actual pages</td><td>Weighted pages</td></tr>"));
for (DateTime dtMonth = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(-12); dtMonth <= new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); dtMonth = dtMonth.AddMonths(1))
{
try
{
double monthWeight = 0.0;
for (DateTime dtDay = dtMonth; dtDay < dtMonth.AddMonths(1) && dtDay < DateTime.Today; dtDay = dtDay.AddDays(1))
{
monthWeight += weight[dtDay.DayOfWeek];
}
Query qMonth = new Query();
qMonth.ExtraSelectElements.Add("Count", "SUM([Log].[Count])");
qMonth.QueryCondition = new And(
new Q(Log.Columns.Item, item),
new Q(Log.Columns.Date, QueryOperator.GreaterThanOrEqualTo, dtMonth),
new Q(Log.Columns.Date, QueryOperator.LessThan, dtMonth.AddMonths(1)),
new Q(Log.Columns.Date, QueryOperator.LessThan, DateTime.Today));
qMonth.Columns = new ColumnSet();
LogSet lsMonth = new LogSet(qMonth);
int actualPages = (int)lsMonth[0].ExtraSelectElements["Count"];
double pagesPerWeek = (double)actualPages / monthWeight;
double pagesPerMonth = pagesPerWeek * 4.345238095;
Stats.Controls.Add(new LiteralControl("<tr><td>" + dtMonth.ToString("MMM") + "</td><td>" + dtMonth.Year + "</td><td>" + monthWeight.ToString("0.00") + "</td><td>" + actualPages.ToString("0") + "</td><td>" + pagesPerMonth.ToString("0") + "</td></tr>"));
// Stats.Controls.Add(new LiteralControl( + " " + + " is " + + " weeks. " + + " pages per week.<br>"));
}
catch { }
}
Stats.Controls.Add(new LiteralControl("</table>"));
}
开发者ID:davelondon,项目名称:dontstayin,代码行数:60,代码来源:WeightedPages.ascx.cs
示例3: pagerlinks
/// <summary>
/// Constructor
/// </summary>
public pagerlinks(int Index, int PageSize, int RecordCount, PlaceHolder ph)
{
this._Index = Index;
this._PageSize = PageSize;
this._RcdCount = RecordCount;
this._placeholder = ph;
}
开发者ID:dineshkummarc,项目名称:WorldRecipe-CS,代码行数:10,代码来源:pagerlink.cs
示例4: Create
/// <summary>
/// Create the control contains all components for the dynamic page configuration.
/// </summary>
/// <param name="dynamicPageConfiguration"></param>
/// <returns></returns>
public Control Create(DynamicPageConfiguration dynamicPageConfiguration)
{
PlaceHolder placeHolder = new PlaceHolder();
bool isTopPanel = true;
foreach (BasePanelConfiguration basePanelConfiguration in dynamicPageConfiguration.Panels)
{
WebControl createdControl = null;
switch (basePanelConfiguration.PanelType)
{
case DynamicPagePanelTypes.ButtonPanel:
createdControl = CreateButtonPanel(basePanelConfiguration);
break;
case DynamicPagePanelTypes.GridViewPanel:
createdControl = CreateGridViewPanel(basePanelConfiguration, dynamicPageConfiguration);
createdControl.Style["margin-top"] = isTopPanel ? "2px" : "4px";
break;
case DynamicPagePanelTypes.QueryPanel:
createdControl = CreateQueryPanel(basePanelConfiguration);
createdControl.Style["margin-top"] = isTopPanel ? "2px" : "4px";
break;
}
if (createdControl != null)
{
isTopPanel = false;
placeHolder.Controls.Add(createdControl);
}
}
return placeHolder;
}
开发者ID:TatumAndBell,项目名称:RapidWebDev-Enterprise-CMS,代码行数:39,代码来源:VerticalDynamicPageLayout.cs
示例5: BuildNotifications
public PlaceHolder BuildNotifications(string userId)
{
DataHandler handler = new DataHandler();
string query;
PlaceHolder ph = new PlaceHolder();
DataTable[] tables = new DataTable[2];
ArrayList messages = new ArrayList();
GroupService groupService = new GroupService();
//http://stackoverflow.com/questions/5672862/check-if-datetime-instance-falls-in-between-other-two-datetime-objects
//notification: you added a teacher
query =
"SELECT * FROM user_UserHasTeachers " +
"WHERE TeacherId = ''" +
"ORDER BY Timestamp";
tables[0] = handler.GetDataTable(query);
foreach (DataRow row in tables[0].Rows)
{
}
//make sense of the data tables
//for each table
foreach (DataTable dt in tables)
{
//check timestamp
//insert into position
}
return ph;
}
开发者ID:JamesWClark,项目名称:Strikethrough,代码行数:34,代码来源:NotifcationService.asmx.cs
示例6: SetData
public void SetData (System.Web.UI.WebControls.PlaceHolder Anchor,
DataHandling DhExisting, int NumberOfDisplayableEntries)
{
m_Anchor = Anchor;
m_Dh = DhExisting;
m_NumberOfDisplayableEntries = NumberOfDisplayableEntries;
}
开发者ID:heinzsack,项目名称:DEV,代码行数:7,代码来源:FormatiereBeitraege.cs
示例7: showpeiveodl
public void showpeiveodl(DataSet ds, int iden)
{
if (ds.Tables[0].Rows.Count > 0)
{
StreamReader fp;
string folderid = getremembrancefolderName(iden);
string filepath = Server.MapPath("../remembrancefiles/" + folderid + "/" + iden + "/" + "index.html");
string imagePath = Server.MapPath("../remembrancefiles/" + folderid + "/" + iden + "/images");
if (File.Exists(filepath))
{
fp = File.OpenText(Server.MapPath("../remembrancefiles/" + folderid + "/" + iden + "/" + "index.html"));
filecontent = fp.ReadToEnd();
fp.Close();
if (Directory.Exists(imagePath))
{
filecontent = filecontent.Replace("images", "../remembrancefiles/" + folderid + "/" + iden + "/images");
}
}
PlaceHolder pl = new PlaceHolder();
StringBuilder htmlTable = new StringBuilder();
htmlTable.Append(filecontent);
pl.Controls.Add(new Literal { Text = htmlTable.ToString() });
Page.FindControl("mess").Controls.Add(pl);
}
else
{
Response.Redirect("index.aspx");
}
}
开发者ID:pavanvadlamudi-cit,项目名称:dmd,代码行数:31,代码来源:viewremembranceold.aspx.cs
示例8: AddReportBody
private void AddReportBody(Panel reportContainer)
{
reportBody = new Panel();
reportBody.ID = "report";
header = new ReportHeader();
header.Path = MixERP.Net.Common.Helpers.ConfigurationHelper.GetSectionKey("MixERPReportParameters", "HeaderPath");
reportBody.Controls.Add(header);
reportTitleLiteral = new Literal();
reportBody.Controls.Add(reportTitleLiteral);
topSectionLiteral = new Literal();
reportBody.Controls.Add(topSectionLiteral);
gridPlaceHolder = new PlaceHolder();
reportBody.Controls.Add(gridPlaceHolder);
bodyContentsLiteral = new Literal();
reportBody.Controls.Add(bodyContentsLiteral);
bottomSectionLiteral = new Literal();
reportBody.Controls.Add(bottomSectionLiteral);
reportContainer.Controls.Add(reportBody);
}
开发者ID:ravikumr070,项目名称:mixerp,代码行数:26,代码来源:Body.cs
示例9: Add_Main_Viewer_Section
public override void Add_Main_Viewer_Section(PlaceHolder placeHolder, Custom_Tracer Tracer)
{
if ((CurrentItem.Behaviors.Can_Be_Described) && (CurrentUser != null))
{
// Determine the number of columns for text areas, depending on browser
int actual_cols = 50;
if (CurrentMode.Browser_Type.ToUpper().IndexOf("FIREFOX") >= 0)
actual_cols = 45;
StringBuilder responseBuilder = new StringBuilder();
responseBuilder.AppendLine("<!-- Add descriptive tage form -->");
responseBuilder.AppendLine("<div class=\"describe_popup_div\" id=\"describe_item_form\" style=\"display:none;\">");
responseBuilder.AppendLine(" <div class=\"popup_title\"><table width=\"100%\"><tr><td align=\"left\">A<span class=\"smaller\">DD </span> I<span class=\"smaller\">TEM </span> D<span class=\"smaller\">ESCRIPTION</span></td><td align=\"right\"> <a href=\"#template\" alt=\"CLOSE\" onclick=\"describe_item_form_close()\">X</a> </td></tr></table></div>");
responseBuilder.AppendLine(" <br />");
responseBuilder.AppendLine(" <fieldset><legend>Enter a description or notes to add to this item </legend>");
responseBuilder.AppendLine(" <br />");
responseBuilder.AppendLine(" <table class=\"popup_table\">");
// Add comments area
responseBuilder.Append(" <tr align=\"left\" valign=\"top\"><td><br /><label for=\"add_notes\">Notes:</label></td>");
responseBuilder.AppendLine("<td><textarea rows=\"10\" cols=\"" + actual_cols + "\" name=\"add_tag\" id=\"add_tag\" class=\"add_notes_textarea\" onfocus=\"javascript:textbox_enter('add_tag','add_notes_textarea_focused')\" onblur=\"javascript:textbox_leave('add_tag','add_notes_textarea')\"></textarea></td></tr>");
responseBuilder.AppendLine(" </table>");
responseBuilder.AppendLine(" <br />");
responseBuilder.AppendLine(" </fieldset><br />");
responseBuilder.AppendLine(" <center><a href=\"\" onclick=\"return describe_item_form_close();\"><img border=\"0\" src=\"" + CurrentMode.Base_URL + "design/skins/" + CurrentMode.Base_Skin + "/buttons/cancel_button_g.gif\" alt=\"CLOSE\" /></a> <input type=\"image\" src=\"" + CurrentMode.Base_URL + "design/skins/" + CurrentMode.Base_Skin + "/buttons/save_button_g.gif\" value=\"Submit\" alt=\"Submit\" ></center><br />");
responseBuilder.AppendLine("</div>");
responseBuilder.AppendLine();
placeHolder.Controls.Add(new Literal() { Text = responseBuilder.ToString() });
}
}
开发者ID:randomyed,项目名称:SobekCM-Web-Application,代码行数:31,代码来源:Describe_Fragment_ItemViewer.cs
示例10: Add_Main_Viewer_Section
/// <summary> Adds the main view section to the page turner </summary>
/// <param name="placeHolder"> Main place holder ( "mainPlaceHolder" ) in the itemNavForm form into which the the bulk of the item viewer's output is displayed</param>
/// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
public override void Add_Main_Viewer_Section(PlaceHolder placeHolder, Custom_Tracer Tracer)
{
if (Tracer != null)
{
Tracer.Add_Trace("Feature_ItemViewer.Add_Main_Viewer_Section", "Adds one literal with all the html");
}
// Build the value
StringBuilder builder = new StringBuilder(5000);
// Save the current viewer code
string current_view_code = CurrentMode.ViewerCode;
// Start the citation table
builder.AppendLine("\t\t<!-- FEATURE VIEWER OUTPUT -->" );
builder.AppendLine("\t\t<td align=\"left\" height=\"40px\" ><span class=\"SobekViewerTitle\"><b>Index of Features</b></span></td></tr>" );
builder.AppendLine("\t\t<tr><td class=\"SobekDocumentDisplay\">");
builder.AppendLine("\t\t\t<div class=\"SobekCitation\">");
// Get the list of streets from the database
Map_Features_DataSet features = SobekCM_Database.Get_All_Features_By_Item( CurrentItem.Web.ItemID, Tracer );
Create_Feature_Index( builder, features );
// Finish the citation table
builder.AppendLine( "\t\t\t</div>" );
builder.AppendLine("\t\t</td>" );
builder.AppendLine("\t\t<!-- END FEATURE VIEWER OUTPUT -->" );
// Restore the mode
CurrentMode.ViewerCode = current_view_code;
// Add the HTML for the image
Literal mainLiteral = new Literal {Text = builder.ToString()};
placeHolder.Controls.Add( mainLiteral );
}
开发者ID:randomyed,项目名称:SobekCM-Web-Application,代码行数:38,代码来源:Feature_ItemViewer.cs
示例11: Add_Main_Viewer_Section
/// <summary> Adds the main view section to the page turner </summary>
/// <param name="placeHolder"> Main place holder ( "mainPlaceHolder" ) in the itemNavForm form into which the the bulk of the item viewer's output is displayed</param>
/// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
public override void Add_Main_Viewer_Section(PlaceHolder placeHolder, Custom_Tracer Tracer)
{
if (Tracer != null)
{
Tracer.Add_Trace("EmbeddedVideo_ItemViewer.Add_Main_Viewer_Section", "Adds one literal with all the html");
}
//Determine the name of the FLASH file
string youtube_url = CurrentItem.Bib_Info.Location.Other_URL;
if (youtube_url.IndexOf("watch") > 0)
youtube_url = youtube_url.Replace("watch?v=", "v/") + "?fs=1&hl=en_US";
const int width = 600;
const int height = 480;
// Add the HTML for the image
StringBuilder result = new StringBuilder(500);
result.AppendLine(" <!-- EMBEDDED VIDEO VIEWER OUTPUT -->");
result.AppendLine(" <td align=\"left\"><span class=\"SobekViewerTitle\"><b>Streaming Video</b></span></td>");
result.AppendLine(" </tr>");
result.AppendLine(" <tr>");
result.AppendLine(" <td class=\"SobekCitationDisplay\">");
result.AppendLine(CurrentItem.Behaviors.Embedded_Video);
result.AppendLine(" </td>");
result.AppendLine(" <!-- END EMBEDDED VIDEO VIEWER OUTPUT -->");
Literal mainLiteral = new Literal { Text = result.ToString() };
placeHolder.Controls.Add(mainLiteral);
}
开发者ID:randomyed,项目名称:SobekCM-Web-Application,代码行数:33,代码来源:EmbeddedVideo_ItemViewer.cs
示例12: Add_Main_Viewer_Section
/// <summary> Adds the main view section to the page turner </summary>
/// <param name="placeHolder"> Main place holder ( "mainPlaceHolder" ) in the itemNavForm form into which the the bulk of the item viewer's output is displayed</param>
/// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
public override void Add_Main_Viewer_Section(PlaceHolder placeHolder, Custom_Tracer Tracer)
{
if (Tracer != null)
{
Tracer.Add_Trace("YouTube_Embedded_Video_ItemViewer.Add_Main_Viewer_Section", "Adds one literal with all the html");
}
//Determine the name of the FLASH file
string youtube_url = CurrentItem.Bib_Info.Location.Other_URL;
if ( youtube_url.IndexOf("watch") > 0 )
youtube_url = youtube_url.Replace("watch?v=","v/") + "?fs=1&hl=en_US";
const int width = 600;
const int height = 480;
// Add the HTML for the image
StringBuilder result = new StringBuilder(500);
result.AppendLine(" <!-- YOU TUBE VIEWER OUTPUT -->");
result.AppendLine(" <td align=\"left\"><span class=\"SobekViewerTitle\"><b>Streaming Video</b></span></td>");
result.AppendLine(" </tr>");
result.AppendLine(" <tr>");
result.AppendLine(" <td class=\"SobekCitationDisplay\">");
result.AppendLine(" <object width=\"" + width + "\" height=\"" + height + "\">");
result.AppendLine(" <param name=\"allowscriptaccess\" value=\"always\" />");
result.AppendLine(" <param name=\"movie\" value=\"" + youtube_url + "\" />");
result.AppendLine(" <param name=\"allowFullScreen\" value=\"true\"></param>");
result.AppendLine(" <embed src=\"" + youtube_url + "\" type=\"application/x-shockwave-flash\" AllowScriptAccess=\"always\" allowfullscreen=\"true\" width=\"" + width + "\" height=\"" + height + "\"></embed>");
result.AppendLine(" </object>");
result.AppendLine(" </td>" );
result.AppendLine(" <!-- END YOU TUBE VIEWER OUTPUT -->" );
Literal mainLiteral = new Literal {Text = result.ToString()};
placeHolder.Controls.Add(mainLiteral);
}
开发者ID:randomyed,项目名称:SobekCM-Web-Application,代码行数:36,代码来源:YouTube_Embedded_Video_ItemViewer.cs
示例13: OnInit
protected override void OnInit(EventArgs e)
{
Title = "View \"" + SelectedItem.Title + "\"";
// Get selected property from content item.
ContentType contentType = Zeus.Context.Current.ContentTypes[SelectedItem.GetType()];
foreach (IContentProperty property in contentType.Properties)
{
PlaceHolder plcDisplay = new PlaceHolder();
Panel panel = new Panel { CssClass = "editDetail" };
HtmlGenericControl label = new HtmlGenericControl("label");
label.Attributes["class"] = "editorLabel";
label.InnerText = property.Name;
panel.Controls.Add(label);
plcDisplay.Controls.Add(panel);
plcDisplayers.Controls.Add(plcDisplay);
IDisplayer displayer = contentType.GetDisplayer(property.Name);
if (displayer != null)
{
//displayer.AddTo(this, contentItem, this.PropertyName);
displayer.InstantiateIn(panel);
displayer.SetValue(panel, SelectedItem, property.Name);
}
else
{
panel.Controls.Add(new LiteralControl("{No displayer}"));
}
panel.Controls.Add(new LiteralControl(" "));
}
base.OnInit(e);
}
开发者ID:dpawatts,项目名称:zeus,代码行数:33,代码来源:View.aspx.cs
示例14: displayShow
private void displayShow(PlaceHolder placeholder, int shid)
{
placeholder.Controls.Clear();
Show show = new Show();
show.id = Convert.ToInt32(Request["shid"]);
show.get();
TextBox tickets = new TextBox();
tickets.ID = "numOfTickets";
Button order = new Button();
order.Text = "Order!";
order.Click += new System.EventHandler(this.orderClick);
HiddenField hiddenShid = new HiddenField();
hiddenShid.Value = shid.ToString();
hiddenShid.ID = "hiddenShid";
placeholder.Controls.Add(new LiteralControl("<h1>"+show.read("moid", true)+" @ "+show.read("show_start")+"</h1>"));
placeholder.Controls.Add(new LiteralControl("<p>### tickets left</p>"));
placeholder.Controls.Add(new LiteralControl("<p>Please input # of tickets you want to order</p>"));
placeholder.Controls.Add(tickets);
placeholder.Controls.Add(order);
placeholder.Controls.Add(new LiteralControl("<br /><br /><a href=\"order_ticket.aspx\">Back to show list</a>"));
placeholder.Controls.Add(hiddenShid);
}
开发者ID:cmol,项目名称:cinemaxxx,代码行数:26,代码来源:order_ticket.aspx.cs
示例15: Add_Main_Viewer_Section
/// <summary> Adds the main view section to the page turner </summary>
/// <param name="placeHolder"> Main place holder ( "mainPlaceHolder" ) in the itemNavForm form into which the the bulk of the item viewer's output is displayed</param>
/// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
public override void Add_Main_Viewer_Section(PlaceHolder placeHolder, Custom_Tracer Tracer)
{
if (Tracer != null)
{
Tracer.Add_Trace("Download_Only_ItemViewer.Add_Main_Viewer_Section", "Adds one literal with all the html");
}
// Build the value
StringBuilder builder = new StringBuilder(1500);
// Save the current viewer code
string current_view_code = CurrentMode.ViewerCode;
// Start the citation table
builder.AppendLine("\t\t<!-- DOWNLOAD ONLY VIEWER OUTPUT -->" );
builder.AppendLine("\t\t<td class=\"SobekDocumentDisplay\">" );
builder.AppendLine("\t\t\t<div class=\"SobekCitation\">" );
builder.AppendLine("\t\t\t</div>" );
// Finish the table
builder.AppendLine( "\t\t</td>" );
builder.AppendLine("\t\t<!-- END DOWNLOAD ONLY VIEWER OUTPUT -->" );
// Restore the mode
CurrentMode.ViewerCode = current_view_code;
// Add the HTML for the image
Literal mainLiteral = new Literal {Text = builder.ToString()};
placeHolder.Controls.Add( mainLiteral );
}
开发者ID:randomyed,项目名称:SobekCM-Web-Application,代码行数:34,代码来源:Download_Only_ItemViewer.cs
示例16: CreateChildControls
protected override void CreateChildControls()
{
Controls.Clear();
Control articleMarkup = Page.LoadControl("~/Design/Article.ascx");
_headerPlaceholder = articleMarkup.FindControl("HeaderPlaceholder") as PlaceHolder;
_contentPlaceholder = articleMarkup.FindControl("ContentPlaceholder") as PlaceHolder;
_headerPlaceholder.Visible = ! String.IsNullOrEmpty(_caption);
if (_headerPlaceholder.Visible)
{
Literal caption = new Literal();
caption.Text = _caption;
_headerPlaceholder.Controls.Add(caption);
}
if (_contentTemplate != null)
{
TemplateContainer container = new TemplateContainer();
_contentTemplate.InstantiateIn(container);
_contentPlaceholder.Controls.Add(container);
}
Controls.Add(articleMarkup);
}
开发者ID:xs2ranjeet,项目名称:13ns9-1spr,代码行数:27,代码来源:Article.cs
示例17: ShowSaveMessage
protected void ShowSaveMessage( PlaceHolder plhSaveMessage )
{
if( IsPostBack ) {
return;
}
if( plhSaveMessage == null || plhSaveMessage == null ) {
return;
}
string msg = Session[ "SaveMessage" ] as string;
if( msg == null ) {
return;
}
plhSaveMessage.Controls.Add( string.Format( "<div id=\"savemessage\">{0}</div>", msg ) );
plhSaveMessage.Visible = true;
plhSaveMessage.Controls.Add( @"
<script type=""text/javascript"">
function hideSaveMessage() {
if( !document.getElementById(""savemessage"") ) {
return;
}
$( ""#savemessage"" ).slideUp( 300 );
}
$( ""document"" ).ready( function() { setTimeout( ""hideSaveMessage()"", 2000 ); } );
</script>
" );
try {
Session.Remove( "SaveMessage" );
} catch {
}
}
开发者ID:EsleEnoemos,项目名称:HappyIndex2,代码行数:30,代码来源:BaseForm.cs
示例18: CreateChildControls
protected override void CreateChildControls()
{
Controls.Add(this.ok = new PlaceHolder());
Controls.Add(this.fail = new PlaceHolder());
base.CreateChildControls();
}
开发者ID:elementar,项目名称:Suprifattus.Util,代码行数:7,代码来源:SecureBlock.cs
示例19: LoadFooterCtrl
protected void LoadFooterCtrl(PlaceHolder plcHolder, ControlLocation CtrlKey) {
string sControlPath = String.Empty;
CarrotCakeConfig config = CarrotCakeConfig.GetConfig();
switch (CtrlKey) {
case ControlLocation.PublicFooter:
sControlPath = config.AdminFooterControls.ControlPathPublic;
break;
case ControlLocation.PopupFooter:
sControlPath = config.AdminFooterControls.ControlPathPopup;
break;
case ControlLocation.MainFooter:
sControlPath = config.AdminFooterControls.ControlPathMain;
break;
}
if (!String.IsNullOrEmpty(sControlPath)) {
if (File.Exists(Server.MapPath(sControlPath))) {
Control ctrl = new Control();
ctrl = Page.LoadControl(sControlPath);
plcHolder.Controls.Add(ctrl);
}
}
}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:26,代码来源:AdminBaseMasterPage.cs
示例20: 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_templates_footer.aspx.cs
注:本文中的System.Web.UI.WebControls.PlaceHolder类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论