Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 73d0194

Browse files
override existing tag
1 parent 1da0aca commit 73d0194

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using Microsoft.AspNetCore.Razor.TagHelpers;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Threading.Tasks;
6+
7+
namespace Webgentle.BookStore.Helpers
8+
{
9+
[HtmlTargetElement("big")]
10+
[HtmlTargetElement(Attributes ="big")]
11+
public class BigTagHelper : TagHelper
12+
{
13+
public override void Process(TagHelperContext context, TagHelperOutput output)
14+
{
15+
output.TagName = "h3";
16+
output.Attributes.RemoveAll("big");
17+
output.Attributes.SetAttribute("class", "h3");
18+
}
19+
}
20+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /