Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Binding Textbox to a Class Property
Message
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Binding Textbox to a Class Property
Miscellaneous
Thread ID:
00908931
Message ID:
00908931
Views:
76
Help!!!

I am trying to bind a Class Property Address::Street
to a text box and the program keeps generating
an exception.

Any Ideas?



//DEFINE class Address
public class Address {
public String Street, City, State, Zip;
public int Amount;

}

public class WinForm : System.Windows.Forms.Form
{
///
/// Required designer variable.
///

//Create Class Address property
private System.Windows.Forms.TextBox tbStreet;
public string Street;
.
.
.
private void InitializeComponent()
{
//Initialize Address object
this.tbStreet = new System.Windows.Forms.TextBox();
this.oAddress = new Address();


this.tbStreet.DataBindings.Add("Text", oAddress,"Street");
Next
Reply
Map
View

Click here to load this message in the networking platform