| 1 |
@{ |
| 2 |
string message = "foreignObject example with Scalable Vector Graphics (SVG)"; |
| 3 |
} |
| 4 |
|
| 5 |
<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"> |
| 6 |
<rect x="0" y="0" rx="10" ry="10" width="200" height="200" stroke="black" |
| 7 |
fill="none" /> |
| 8 |
<foreignObject x="20" y="20" width="160" height="160"> |
| 9 |
<p>@message</p> |
| 10 |
</foreignObject> |
| 11 |
</svg> |
| 12 |
|
| 13 |
<!-- @do while --> |
| 14 |
|
| 15 |
@{ var i = 0; } |
| 16 |
@do |
| 17 |
{ |
| 18 |
var person = people[i]; |
| 19 |
<p>Name: @person.Name</p> |
| 20 |
<p>Age: @person.Age</p> |
| 21 |
|
| 22 |
i++; |
| 23 |
} while (i < people.Length); |
| 24 |
|
| 25 |
<!-- From https://learn.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-7.0 --> |
| 26 |
|