#2 Json Html5 Attributes from code
RazorBlade Advanced JSON Attributes with @Tag.Attr v3
Here we'll go through some more advanced examples using @Tag.Attr(...)
Creating Attributes Containing JSON
This div has an attribute created using an object, because we wanted json. If you look at the source, youll find data-my='{"Name":"razor","Description":"This isn\u0027t your normal text - it has \n line breaks and apostrophes"}'
#2 Json Html5 Attributes from code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX