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


C# HtmlTag.Add方法代码示例

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


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

示例1: VisualizeException

        public HtmlTag VisualizeException(ExceptionReport report)
        {
            var tag = new HtmlTag("div");
            tag.Add("p").Add("b").Text("Exception: " + report.ExceptionType);
            tag.Add("pre").AddClass("text-warning").Text(report.ExceptionText);

            return tag;
        }
开发者ID:joemcbride,项目名称:fubumvc,代码行数:8,代码来源:RequestsFubuDiagnostics.cs

示例2: GetCharisma_Alert

 public static string GetCharisma_Alert(Charisma_AlertType type, string title, string msg)
 {
     var tag = new HtmlTag("div").AddClass("alert").AddClass(type.ToText());
     tag.Add("button").AddClass("close").Attr("type", "button").Attr("data-dismiss", "alert").Text("×");
     tag.Add("h4").AddClass("alert-heading").Text(title);
     tag.Add("p").Text(msg);
     return tag.ToString();
 }
开发者ID:vvvsrx,项目名称:AUserCenter,代码行数:8,代码来源:HtmlUtils.cs

示例3: HtmlDocument

 public HtmlDocument()
 {
     RootTag = new HtmlTag("html");
     DocType = "<!DOCTYPE html>";
     _head = RootTag.Add("head");
     _title = _head.Add("title");
     _body = RootTag.Add("body");
     Last = _body;
 }
开发者ID:rrawla,项目名称:BootstrapHelpers,代码行数:9,代码来源:HtmlDocument.cs

示例4: get_scheduled_jobs

        public HtmlTag get_scheduled_jobs()
        {
            var tag = new HtmlTag("div");
            tag.Add("h1").Text("Scheduled Jobs Monitor");
            tag.Add("p").Text("at {0} -- reload the page to refresh the data".ToFormat(DateTime.Now));

            var schedule = _persistence.FindAll(_graph.Name);
            tag.Append(new ScheduledJobTable(_urls, schedule));

            return tag;
        }
开发者ID:cothienlac86,项目名称:fubumvc,代码行数:11,代码来源:ScheduledJobsFubuDiagnostics.cs

示例5: find_first_child

        public void find_first_child()
        {
            var tag = new HtmlTag("a");
            tag.Add("span");
            tag.Add("span");
            var div = tag.Add("div");
            tag.Add("input");
            tag.Add("button");

            new TagHolder(tag).ForChild("div").ShouldBeTheSameAs(div);
        }
开发者ID:joemcbride,项目名称:fubumvc,代码行数:11,代码来源:HtmlTagExtensionsTester.cs

示例6: Transform

        public string Transform(Topic current, string data)
        {
            var ol = new HtmlTag("ol").AddClass("breadcrumb");

            current.Ancestors().Each(x =>
            {
                ol.Add("li/a").Attr("href", _resolver.ToUrl(current, x)).Text(x.Title);
            });

            ol.Add("li").AddClass("active").Text(current.Title);

            return ol.ToString();
        }
开发者ID:jamesmanning,项目名称:Storyteller,代码行数:13,代码来源:ParentBreadcrumbsTransformHandler.cs

示例7: BuildFolderTag

        public HtmlTag BuildFolderTag(SpecificationFolder folder)
        {
            var folderTag = new HtmlTag("li");
            var link = linkTagForFolder(folder);

            folderTag.Add("span").AddClass("folder").Append(link);

            var ul = folderTag.Add("ul");

            var builder = new ChildTagBuilder(this, ul);
            folder.ImmediateChildren.Each(x => x.AcceptVisitor(builder));

            return folderTag;
        }
开发者ID:DRHouk,项目名称:fubumvc,代码行数:14,代码来源:SpecHierarchyBuilder.cs

示例8: get_subscriptions

        public HtmlTag get_subscriptions()
        {
            var div = new HtmlTag("div");

            div.Add("h3").Text("Subscription Persistence");
            div.Append( new DescriptionBodyTag(Description.For(_persistence)));

            div.Add("h3").Text("Nodes");
            div.Append(new TransportNodeTableTag(_persistence.AllNodes()));

            div.Add("h3").Text("Subscriptions");
            div.Append(new SubscriptionStorageTableTag(_persistence.AllSubscriptions()));

            return div;
        }
开发者ID:cothienlac86,项目名称:fubumvc,代码行数:15,代码来源:SubscriptionsFubuDiagnostics.cs

示例9: get_conventions

        public ConventionsViewModel get_conventions()
        {
            var configTypes = new string[]
                   {
                       ConfigurationType.Settings,
                       ConfigurationType.Discovery,
                       ConfigurationType.Explicit,
                       ConfigurationType.Policy,
                       ConfigurationType.Attributes,
                       ConfigurationType.ModifyRoutes,
                       ConfigurationType.InjectNodes,
                       ConfigurationType.Conneg,
                       ConfigurationType.Attachment,
                       ConfigurationType.Navigation,
                       ConfigurationType.ByNavigation,
                       ConfigurationType.Reordering,
                       ConfigurationType.Instrumentation
                   };

            var tag = new HtmlTag("ul");
            configTypes.Each(configType => {
                tag.Add("li/a").Text(configType).Attr("href", "#" + configType);
            });


            return new ConventionsViewModel
            {
                Descriptions = new TagList(configTypes.Select(configType => new ConfigurationTypeTag(configType, _graph))),
                TableOfContents = tag
            };
        }
开发者ID:DarthFubuMVC,项目名称:FubuMVC.Diagnostics,代码行数:31,代码来源:ConventionsFubuDiagnostics.cs

示例10: get_tasks

        public HtmlTag get_tasks()
        {
            var peers = _repository.FindPeers();
            var cache = new Cache<Uri, TransportNode>();
            peers.Each(peer => peer.OwnedTasks.Each(x => cache[x] = peer));

            var tag = new HtmlTag("div");
            tag.Add("h1").Text("Task Assignements");

            var table = new TableTag();
            tag.Append(table);

            table.AddClass("table");

            table.AddHeaderRow(row => {
                row.Header("Task");
                row.Header("Assigned to");
                row.Header("Control Channel");
            });

            var tasks = _tasks.PermanentTasks().Union(_tasks.ActiveTasks()).ToArray();
            tasks.Each(uri => {
                table.AddBodyRow(row => addRow(row, uri, cache));
            });

            return tag;
        }
开发者ID:RyanHauert,项目名称:FubuTransportation,代码行数:27,代码来源:TasksFubuDiagnostics.cs

示例11: HtmlDocument

 public HtmlDocument()
 {
     _head = _top.Add("head");
     _title = _head.Add("title");
     _body = _top.Add("body");
     _last = _body;
 }
开发者ID:shashankshetty,项目名称:fubumvc,代码行数:7,代码来源:HtmlDocument.cs

示例12: VisualizePartial

        public HtmlTag VisualizePartial(BehaviorFinish finish)
        {
            var description = Description.For(finish.Correlation.Node);

            var tag = new HtmlTag("div").AddClass("behavior-finish");

            tag.Add("span").Text("Finished ").Add("i").Text(description.Title);
            if (!finish.Succeeded)
            {
                tag.Next = new ExceptionReportTag(finish.Exception);

                tag.Add("span").Text(finish.Exception.ExceptionType).AddClass("exception");
            }

            tag.PrependGlyph("icon-chevron-up");

            return tag;
        }
开发者ID:joemcbride,项目名称:fubumvc,代码行数:18,代码来源:BehaviorStartAndFinishEndpoints.cs

示例13: HtmlDocument

 public HtmlDocument()
 {
     DocType =
         "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
     _head = _top.Add("head");
     _title = _head.Add("title");
     _body = _top.Add("body");
     _last = _body;
 }
开发者ID:JamieDraperUK,项目名称:fubumvc,代码行数:9,代码来源:HtmlDocument.cs

示例14: HtmlPartial

        public HtmlTag HtmlPartial(PartialRequest request)
        {
            var inner = new HtmlTag("div");
            for (var i = 0; i < 5; i++)
            {
                inner.Add("p").Text(Guid.NewGuid().ToString());
            }

            return inner;
        }
开发者ID:mtscout6,项目名称:FubuMVC.TwitterBootstrap,代码行数:10,代码来源:PartialRequest.cs

示例15: get_description_Name

        public HtmlTag get_description_Name(DescriptionRequest request)
        {
            var description = DescriptionBag.DescriptionFor(request.Name);

            var tag = new HtmlTag("div");
            tag.Add("h4").Text(description.Title);

            tag.Append(new DescriptionBodyTag(description));

            return tag;
        }
开发者ID:DarthFubuMVC,项目名称:FubuMVC.Diagnostics,代码行数:11,代码来源:DescriptionEndpoints.cs


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