ahmed salah

ahmed salah

  • 1.1k
  • 547
  • 60.7k

How to display line under property if it have null value asp.net mvc ?

Oct 16 2023 7:23 PM

I work on asp.net mvc i face issue line under text not display when viewbag value is null or empty

i need to display line below if it exist or not 

so user will see line with no value when viewbag property is null 

and if it have value it will display line below 

what i try as below :

  .requestInfo-flex-div-1 {
    width: 37mm;
} 

 <div class="flex" style="margin-top:-10px;">

            <div class="requestInfo-flex-div-1">
                <label style="width: 20mm; border-bottom: solid 1px black; text-align: center;">@ViewBag.Solicitations </label>
            </div>
            <div style="margin-left:-100px;">
                Solicitations of Customer
            </div>

            <div style="margin-left:10px;">
                <label style="width: 20mm; border-bottom: solid 1px black; text-align: center;">@ViewBag.Restrictions</label>
            </div>
            <div style="margin-left:10px;">
                Restrictions on Solicitations of Employee
            </div>


        </div>

 


Answers (1)