Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
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>
}
Posted
Updated 7-Sep-16 1:35am

1 solution

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

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

C#
}
 
Share this answer
 

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