Hi @Adithyan,
You can always declare a local variable at the beginning of the View,and then just use it in your tag:
The following test is hidden when a<0, otherwise it appears.
@{
var a = 4;
var style = (a < 0) ? "display:none" : "";
}
<div class="dropdown" id="drp" runat="server">
<div class="tab"> tab</div>
<div class="drpdown-content" style="top:20px">
<a href="link" id="Hide" style="@style">application</a>
<a href="link">application1</a>
<a href="link">application2</a>
<a href="link">application3</a>
</div>
</div>
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.