Abhilash J A

Abhilash J A

  • 534
  • 2.4k
  • 598.5k

how to split element then bind inside view page ?

Apr 27 2017 4:44 AM
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)