Two way databinding in ASP.NET

后端 未结 5 1082
离开以前
离开以前 2021-01-18 14:29

Let say that we have an object

class Entity
{
    public string ID {get; set;}
    public string Name {get; set;}
}

I want to bind properti

5条回答
  •  梦谈多话
    2021-01-18 15:03

    here the problem is you are trying to create dynamic control.

    you can use a gridview control in .aspx page and bind the data, it has viewstate by default instead of yours..

    Anyway web is stateless, we should retain the data through ViewState or Session or Application. Also you can keep it in cache but not reliable (we can make it pragmatically reliable). Most of the .NET controls has ViewState in-built.

提交回复
热议问题