How do I bind a GridView to a custom object?

后端 未结 3 2069
耶瑟儿~
耶瑟儿~ 2020-12-10 15:50

If I have the following ASP.NET code (it\'s not complete - obviously there\'s a lot missing, but none of it matters):

    
        

        
3条回答
  •  眼角桃花
    2020-12-10 16:03

    You can do something like

     My Label: 
    

    in the markup and similar stuff for your textbox.

    GridView1.DataSource = MyListOfObjects
    GridView1.DataBind()
    

提交回复
热议问题