2
Reply

how to split element then bind inside view page ?

Mani Kandan

Mani Kandan

Apr 27 2017 4:44 AM
196
Hello,
 
I am working on mvc, there is model object have comma contain string. Then,
 
  1. return View("PartnerProfile", ProfileModel); 
 how can split and show 1st element in the below <h3> and others ?
  1. string obj = "A,b,c,d"
 
 View,
  1. <ul class="sev-list">  
  2.                                     <h3>A</h3>  
  3.                                     <li>b</li>  
  4.                                     <li>c</li>  
  5.                                     <li>d</li>  
  6.                                 </ul> 
 

Answers (2)