模板:

<div class="content">
    $for(var v in ls){
        $if(v>10){
<div style="color:Red;">$v</div>}else{<div>$v</div>}
    }
</div> 

控制类: using System.Collections.Generic;


namespace Cvv.WestcoMarketing.WebApp.PageControllers
{
    
class Index : BaseController
    {
        
public void Run()
        {
            List
<int> ls = new List<int>();

            
for (int i = 0; i < 20; i++)
            {
                ls.Add(i 
* i * i);
            }

            ViewData[
"ls"= ls;
        }
    }
}

开源地址:https://github.com/sskycn/minimvc

项目介绍:http://www.minimvc.com

相关文章:

  • 2022-12-23
  • 2021-10-13
  • 2021-11-25
  • 2022-01-30
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-20
  • 2022-12-23
  • 2022-02-15
  • 2021-12-29
相关资源
相似解决方案