what is the use of Eval() in asp.net

后端 未结 3 1999
独厮守ぢ
独厮守ぢ 2020-12-02 22:36

What is the use of Eval() in ASP.NET?

3条回答
  •  温柔的废话
    2020-12-02 23:20

    While binding a databound control, you can evaluate a field of the row in your data source with eval() function.

    For example you can add a column to your gridview like that :

    
    

    And alternatively, this is the way with eval :

    
    
            
            
    
    
    

    It seems a little bit complex, but it's flexible, because you can set any property of the control with the eval() function :

    
        
            
        
    
    

提交回复
热议问题