Look properly! You did not create any relationship with your
TextBox
.
class MyControl {
Button Button = new Button();
TextBox TextBox = new TextBox();
public string CardNumber {
get { return this.TextBox.Text; }
set { this.TextBox.Text = value; }
}
}
It can be more complex, but you should get the idea.
—SA