Click here to Skip to main content
15,171,053 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Im trying to check the values and if its 0 i want to hide the div element including all the data.. and show the div if its 1 and greater.

What I have tried:

@if (mytoken.SelectToken("noofsupp") !=null)
<-div class="item-other-dealers"> and-@(mytoken.SelectToken("noofsupp")) other dealers<-/a> <-/div>
Updated 7-Sep-16 2:35am

1 solution

@if(myToken.SelectToken("noofsupp") != null && myToken.SelectToken("noofsupp") > 0)

<div class="item-other-dealers">
        <!-- put your content here which will show or hide -->


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900