Two way databinding in ASP.NET

后端 未结 5 1034
离开以前
离开以前 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:02

    For those looking, I made this javascript plugin. It does data binding very close to what WPF does and is easy to use. It has attached documentation in a .txt file

    https://github.com/jdemeuse1204/ObjectDataBinding

    Here is an example of what one of my bindings looks like

    
    

    To activate you call

    $("#yourelementname").observe(yourobject, 'yourbindingname');
    

    To get the object back for saving or other operations

    var object = $("#yourelementname").getObserveObject('yourbindingname');
    

提交回复
热议问题