TagBuilder InnerHtml in ASP.NET 5 MVC 6

后端 未结 6 973
难免孤独
难免孤独 2021-02-07 01:10

It seems to me that there are major breaking changes in TagBuilder as of beta7 with no mention about them in the announcements repo.

Specifically .ToString no longer ren

6条回答
  •  粉色の甜心
    2021-02-07 01:58

    @Memet Olsen

    All my custom TagHelpers broke with an update to 4.6.1 (1.0.0-rc2). InnerHtml.Append() will no longer accept a TagBuilder.

    Instead, AppendHtml() method should be used:

    var container = new TagBuilder("div");
    var input = new TagBuilder("input");
    
    container.InnerHtml.AppendHtml(input);
    

    2nd bug-fix [here]

提交回复
热议问题