[Bind/Protect series] Behaviour in the case of explicit getters/setters

What is the behaviour if decorating with Bind/Protect the public properties that are explicit? Like say this:
image

1 Like

It doesnโ€™t matter if the getter/setter are automatic or explicitly declared. These two properties behave the same in DotVVM

public string Property1 { get; set; }
public string Property1 {
    get { return this.someField; }
    set { this.someField = value; }
}

DotVVM will ignore the protected get, only public accessors are used for serialization. A property without a getter is equivalent to [Bind(Direction.ClientToServer)], it will be initialized to null in JS and then sent on each postback.

1 Like