嘿伙计我有标签,我想用剃须刀,可以删除它?
<div id="branding">
<img alt="stl" src="@Url.Content("pic"/>
@if (Request.IsAuthenticated)
{
....remove the above <img> tag
}
答案 0 :(得分:0)
你不删除它,你只是不首先输出它:
<div id="branding">
@if (!Request.IsAuthenticated) <!-- Note the ! here -->
{
<img alt="stl" src="@Url.Content("pic")/>
}