当前位置: 首页>>代码示例>>C#>>正文


C# HtmlTextWriter.WriteLine方法代码示例

本文整理汇总了C#中System.Web.UI.HtmlTextWriter.WriteLine方法的典型用法代码示例。如果您正苦于以下问题:C# HtmlTextWriter.WriteLine方法的具体用法?C# HtmlTextWriter.WriteLine怎么用?C# HtmlTextWriter.WriteLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Web.UI.HtmlTextWriter的用法示例。


在下文中一共展示了HtmlTextWriter.WriteLine方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Render

		protected override void Render(HtmlTextWriter writer)
		{
			CreateChildControls();
			string styleString = "";

			foreach (string key in Style.Keys)
			{
				styleString += key + ":" + Style[key] + ";";
			}

			writer.WriteLine("<div class=\"propertypane\" style='" + styleString + "'>");
			writer.WriteLine("<div>");
			try
			{
				RenderChildren(writer);
			}

			catch (Exception ex)
			{
				writer.WriteLine("Error creating control <br />");
				writer.WriteLine(ex.ToString());
			}
			writer.WriteLine("</div>");
			writer.WriteLine("</div>");
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:25,代码来源:pane.cs

示例2: renderTitle

 public override void renderTitle(HtmlTextWriter writer)
 {
     //escrever ttulo
     writer.WriteLine("<div  align='center' class='planetInfoZoneTitle'><b>");
     writer.WriteLine( info.getContent("scan_planetTitle"), _sector );
     writer.WriteLine("</b></div>");
 }
开发者ID:zi-yu,项目名称:orionsbelt,代码行数:7,代码来源:TravelPlanetControl.cs

示例3: RenderApple

 private void RenderApple(HtmlTextWriter writer)
 {
     writer.WriteLine("<div>Requires Quicktime and a Html 5 browser such as Firefox 10+ or IE 9+</div>");
     writer.WriteLine("<object data='" + Url + "' width='" + Width +"' height='" + Height + "'><embed src='" + Url + "' width='"+Width+"' height='" + Height + "' /></object> ");
     //writer.WriteLine("<EMBED SRC='"+ Url + "' WIDTH=" + Width+ " HEIGHT = '"+ Height +"' AUTOPLAY='false' CONTROLLER='true' LOOP=\"false\" PLUGINSPAGE=\"http://www.apple.com/quicktime/\">");
     //writer.WriteLine("<video width='" + Width + "' height='" + Height + " autoplay=\"0\" controls=\"1\" tabindex=\"0\"><source type=\"video/mp4\" src='" + Url +"'></source></video>");
 }
开发者ID:alexwoodvisionps,项目名称:RollinRidesSite,代码行数:7,代码来源:MovieControl.cs

示例4: Render

 protected override void Render(HtmlTextWriter output)
 {
     output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Cellpadding, "0");
     output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Cellspacing, "0");
     output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Id, this.ClientID);
     output.AddAttribute("ig_mark", "");
     output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Table);
     output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Tr);
     output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Td);
     output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Id, this.ClientID + "_inputbox");
     /* VS 05/22/2013 Bug 142807 wrong height of input */
     output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Class, "Fonts inputHeight1");
     output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Tabindex, this.TabIndex.ToString());
     if (this.Width != Unit.Empty)
         output.AddStyleAttribute("width", this.Width.ToString());
     output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Input);
     output.RenderEndTag();			// Input
     output.RenderEndTag();			// Td
     output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Td);
     /* VS 05/22/2013 Bug 142807 wrong size of button */
     output.WriteLine("<BUTTON style='width: 15px; height: 20px; padding:0px;' onfocus='blur()' type='button' ID='" + this.ClientID + "_button'>");
     output.Write("<img src = './Images/downarrow.gif'>");
     output.WriteLine("</BUTTON>");
     output.RenderEndTag();			// TD
     output.RenderEndTag();			// Tr
     output.RenderEndTag();			// Table
 }
开发者ID:Antoniotoress1992,项目名称:asp,代码行数:27,代码来源:ComboBox.cs

示例5: Render

        protected override void Render(HtmlTextWriter writer)
        {
            base.Render(writer);

            try
            {
                HttpBrowserCapabilities browserInfo = HttpContext.Current.Request.Browser;
                int browserVersion = browserInfo.MajorVersion;

                switch (Condition.ToLower())
                {
                    case ("lte"):
                        if (browserVersion <= int.Parse(Threshold))
                            writer.WriteLine("<script src=\"" + Source + "\" type=\"text/javascript\">" + "<" + "/" + "script>");
                        break;

                    case ("gt"):
                        if (browserVersion > int.Parse(Threshold))
                            writer.WriteLine("<script src=\"" + Source + "\" type=\"text/javascript\">" + "<" + "/" + "script>");
                        break;

                    case ("gte"):
                        if (browserVersion >= int.Parse(Threshold))
                            writer.WriteLine("<script src=\"" + Source + "\" type=\"text/javascript\">" + "<" + "/" + "script>");
                        break;

                    default:
                        if (browserVersion < int.Parse(Threshold))
                            writer.WriteLine("<script src=\"" + Source + "\" type=\"text/javascript\">" + "<" + "/" + "script>");
                        break;
                }

            }
            catch { }
        }
开发者ID:ricardocarneiro,项目名称:wet-boew-sharepoint,代码行数:35,代码来源:ScriptManager.cs

示例6: BuildItem

		private void BuildItem(System.Web.UI.WebControls.TreeNode item, HtmlTextWriter writer)
		{
			TreeView treeView = this;
			if ((treeView != null) && (item != null) && (writer != null))
			{
				writer.WriteLine();
				writer.WriteBeginTag("li");
				if (item.Selected || IsChildNodeSelected(item.ChildNodes))
					writer.WriteAttribute("class", "open");
				writer.Write(HtmlTextWriter.TagRightChar);
				writer.Indent++;
				writer.WriteLine();
				
				if (!string.IsNullOrEmpty(item.NavigateUrl))
				{
					WriteNodeLink(treeView, item, writer);
				}
				else
				{
					WriteNodePlain(treeView, item, writer);
				}

				if (HasChildren(item))
				{
					BuildItems(item.ChildNodes, false, item.Expanded.Equals(true), writer);
				}

				writer.Indent--;
				writer.WriteLine();
				writer.WriteEndTag("li");
			}
		}
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:32,代码来源:TreeView.cs

示例7: RenderHelp

 /// <summary>Mostra links de ajuda</summary>
 private void RenderHelp( HtmlTextWriter writer )
 {
     writer.WriteLine("<ul class='help_zone'>");
     writer.WriteLine("<li><a href='{0}'>{1}</a></li>", Wiki.GetUrl("Pr�mios"), info.getContent("wiki_Prizes"));
     writer.WriteLine("<li><a href='{0}'>{1}</a></li>", Wiki.GetUrl("Medalhas"), info.getContent("wiki_Medals"));
     writer.WriteLine("</ul>");
 }
开发者ID:zi-yu,项目名称:orionsbelt,代码行数:8,代码来源:Prizes.cs

示例8: Render

        /// <summary>Pinta o controlo</summary>
        protected override void Render( HtmlTextWriter writer )
        {
            Planet previous = null;
            Planet next = null;

            int idx = Player.getIndex(Current);
            previous = getPrevious(idx);
            next = getNext(idx);

            writer.WriteLine("<table width='100%' class='nav'>");
            writer.WriteLine("<tr>");

            writer.WriteLine("<td align='left' width='33%'>");
            if( next != null ) {
                writer.WriteLine("<a href='{0}?id={1}' title='{2} @ {3}'>&lt;&lt;</a>", OrionGlobals.getSectionBaseUrl(Section), next.Id, next.Name, next.Coordinate.ToString() );
            }
            writer.WriteLine("</td>");

            writer.WriteLine("<td align='center' width='33%'>");
            writer.WriteLine("<b>{0}</b> @ {1}", Current.Name, Current.Coordinate.ToString());
            writer.WriteLine("</td>");

            writer.WriteLine("<td align='right' width='33%'>");
            if( previous != null ) {
                writer.WriteLine("<a href='{0}?id={1}' title='{2} @ {3}'>&gt;&gt;</a>", OrionGlobals.getSectionBaseUrl(Section), previous.Id, previous.Name, previous.Coordinate.ToString() );
            }
            writer.WriteLine("</td>");

            writer.WriteLine("</tr>");
            writer.WriteLine("</table>");

            if( Current.IsInBattle ) {
                writer.WriteLine("<div class='errorTitle'>{0}</div>", info.getContent("PlanetInBattle"));
            }
        }
开发者ID:zi-yu,项目名称:orionsbelt,代码行数:36,代码来源:PlanetNavigation.cs

示例9: RenderEndTag

		protected override void RenderEndTag(HtmlTextWriter writer) {
			foreach(string script in this.ScriptBlocks.Values) {
				writer.WriteLine(script);
				writer.WriteLine();
			}
			base.RenderEndTag(writer);
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:7,代码来源:WebHead.cs

示例10: Render

        protected override void Render(HtmlTextWriter writer)
        {
            if (!NotRenderStyles)
            {
                var top_string = "<div class='" +
                                 (String.IsNullOrEmpty(CssIdClassName)
                                      ? Settings.Default.DefaultCssIdClass
                                      : CssIdClassName) +
                                 "'>{TOP}<div class='bl'><div class='br ContentHolder'><div class='PanelRounded bd' rounded='true'>";
                var bottom_string = "</div><div style='clear: both;'></div></div></div>{BOTTOM}</div>";

                var top = DiscardTop
                              ? String.Empty
                              : "<div class='hd'><div class='tl'></div><div class='tr'></div><div class='tc'></div><div style='clear: both;'></div></div>";
                var bottom = DiscardBottom
                                 ? String.Empty
                                 : "<div class='ft'><div class='fl'></div><div class='fr'></div><div class='fc'></div><div style='clear: both;'></div></div>";

                top_string = top_string.Replace("{TOP}", top);
                bottom_string = bottom_string.Replace("{BOTTOM}", bottom);

                writer.WriteLine(top_string);
                base.Render(writer);
                writer.WriteLine(bottom_string);
            }
            else
            {
                base.Render(writer);
            }
        }
开发者ID:Learion,项目名称:BruceToolSet,代码行数:30,代码来源:RoundPanel.cs

示例11: RenderArrayDeclares

            public void RenderArrayDeclares(HtmlTextWriter writer)
            {
                if (_this._registeredArrayDeclares == null || _this._registeredArrayDeclares.Count == 0)
                    return;

                writer.Write(ScriptStartTag);

                foreach (DictionaryEntry entry in _this._registeredArrayDeclares) {
                    var key = (String)entry.Key;
                    var values = (ArrayList)entry.Value;

                    if (!_renderedArrayDeclares.ContainsKey(key)) {
                        var renderedValues = values.Cast<Object>()
                                                   .Select(obj => obj.ToString())
                                                   .ToList();
                        _renderedArrayDeclares[key] = renderedValues;
                        writer.WriteLine("var {0} = new Array({1});", key, String.Join(", ", renderedValues));

                    } else {
                        foreach (var value in values) {
                            var renderedValue = value.ToString();
                            if (!_renderedArrayDeclares[key].Contains(renderedValue)) {
                                writer.WriteLine("{0}.push({1});", key, renderedValue);
                            }
                        }
                    }
                }

                writer.Write(ScriptEndTag);
                _this._registeredArrayDeclares = null;
            }
开发者ID:devhost,项目名称:Corelicious,代码行数:31,代码来源:CustomHtmlForm.ClientScriptManagerWrapper.cs

示例12: WriteFooter

        public static void WriteFooter(HtmlTextWriter wrtr, Type type,
            bool autoDocVersion)
        {
            wrtr.WriteBeginTag("div");
              wrtr.WriteAttribute("id", "content");
              wrtr.Write(HtmlTextWriter.TagRightChar);
              wrtr.WriteLine();

              wrtr.WriteFullBeginTag("h2");
              wrtr.Write("&nbsp;");
              wrtr.WriteEndTag("h2");
              wrtr.WriteLine();

              if (autoDocVersion)
              {
            AssemblyName name1 = type.Assembly.GetName();
            wrtr.Write("{0} {1}.{2}.{3}&nbsp;&nbsp;&nbsp;", name1.Name,
              name1.Version.Major, name1.Version.Minor, name1.Version.Build);

            AssemblyName name2 = typeof(XmlRpcServerProtocol).Assembly.GetName();
            wrtr.Write("{0} {1}.{2}.{3}&nbsp;&nbsp;&nbsp;", name2.Name,
              name2.Version.Major, name2.Version.Minor, name2.Version.Build);

            wrtr.Write(".NET CLR {0}.{1}.{2}&nbsp;&nbsp;&nbsp;",
              Environment.Version.Major,Environment.Version.Minor,
              Environment.Version.Build);
              }
              wrtr.WriteEndTag("div");
              wrtr.WriteLine();
        }
开发者ID:jbrunken,项目名称:ActiveForumsTapatalkXmlRpc,代码行数:30,代码来源:XmlRpcDocWriter.cs

示例13: BuildItems

		private void BuildItems(TreeNodeCollection items, bool isRoot, bool isExpanded, HtmlTextWriter writer)
		{
			if (items.Count > 0)
			{
				writer.WriteLine();

				writer.WriteBeginTag("ul");

				if (isRoot)
				{
					writer.WriteAttribute("id", this.ClientID);
				}
				writer.Write(HtmlTextWriter.TagRightChar);
				writer.Indent++;

				foreach (System.Web.UI.WebControls.TreeNode item in items)
				{
					BuildItem(item, writer);
				}

				writer.Indent--;
				writer.WriteLine();
				writer.WriteEndTag("ul");
			}
		}
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:25,代码来源:TreeView.cs

示例14: Render

        protected override void Render(HtmlTextWriter writer)
        {
            if (_comment.IsSpam)
                _comment.CommentX = "<em>[comment removed]</em>";

            string alternativeCssClass = "";
            if (_useAlternativeStyle)
                alternativeCssClass = "CommentAlt";

            writer.WriteLine(@"<a name=""Comment_{0}""></a><div class=""Comment {0}"">", _comment.CommentID, alternativeCssClass);

            //when displaying user comments
            //need to show which story they commented on
            if (_displayStoryTitle)
            {
                //build local URL to story
                Category category = CategoryCache.GetCategory(_comment.Story.CategoryID, KickPage.HostProfile.HostID);
                string categoryIdentifier = category.CategoryIdentifier;
                string kickStoryUrl = UrlFactory.CreateUrl(UrlFactory.PageName.ViewStory, _comment.Story.StoryIdentifier, categoryIdentifier);

                //story title
                writer.Write(@"<div class=""storyTitle""><a href=""{0}#Comment_{1}"">{2}</a></div><br />",
                        kickStoryUrl, _comment.CommentID, _comment.Story.Title);
            }

            writer.WriteLine(@"<div class=""CommentText"">{0}</div>
                    <div class=""CommentAuthor"">posted by ", KickPage.KickUserProfile.ShowEmoticons ? TextHelper.ReplaceEmoticons(_comment.CommentX, KickPage.StaticEmoticonsRootUrl) : _comment.CommentX);

            UserLink userLink = new UserLink();
            userLink.DataBind(UserCache.GetUser(_comment.UserID));
            userLink.RenderControl(writer);

            writer.WriteLine(@" {0}</div></div>", Dates.ReadableDiff(_comment.CreatedOn, DateTime.Now));
        }
开发者ID:Letractively,项目名称:dotnetkicks,代码行数:34,代码来源:Comment.cs

示例15: RenderHeader

        public override void RenderHeader(HtmlTextWriter writer)
        {
            string spacer = "<img src='" + Page.ResolveClientUrl(Panel.ImagesDir + "spacer.gif") + "'/>";

            writer.WriteLine("");
            writer.Write("<table cellpadding='" + CellPadding + "' cellspacing='" + CellSpacing + "'");
            StringBuilder style = new StringBuilder();
            if (!Width.IsEmpty)
            {
                style.Append("width:" + Width + ";");
            }
            if (style.Length > 0)
            {
                writer.Write(" style='" + style + "'");
            }
            writer.WriteLine(">");
            writer.WriteLine("	<tr>");
            writer.WriteLine("		<td class='panel_grey_ul'>" + spacer + "</td>");
            writer.WriteLine("		<td class='panel_grey_u'>" + spacer + "</td>");
            writer.WriteLine("		<td class='panel_grey_ur'>" + spacer + "</td>");
            writer.WriteLine("	</tr>");
            writer.WriteLine("	<tr>");
            writer.WriteLine("		<td class='panel_grey_l'>" + spacer + "</td>");
            writer.WriteLine("		<td class='panel_grey_c' align='" + InnerAlign + "'>");
        }
开发者ID:3agrey,项目名称:pbc,代码行数:25,代码来源:PanelGrey.cs


注:本文中的System.Web.UI.HtmlTextWriter.WriteLine方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。