Understanding your WEB example?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
davidkennedy
Posts: 18
Joined: Fri 07 Jul 2006 16:21

Understanding your WEB example?

Post by davidkennedy » Fri 28 Jul 2006 19:22

Alexey,
I've been following through your \Samples\Web\CS. Thank you for telling me about it.
In the code below what class contains the DataBind() method. What object is being forced to databind?
protected void btExecute_Click(object sender, System.EventArgs e) {

try {
mySqlConnection.UserId = tbUser.Text;
mySqlConnection.Password = tbPassword.Text;
mySqlConnection.Host = tbHost.Text;
mySqlConnection.Database = tbDatabase.Text;
mySqlConnection.Port = Convert.ToInt32(tbPort.Text);

mySqlCommand.CommandText = tbSQL.Text;

mySqlDataAdapter.Fill(dataSet, "Table");
dataGrid.DataSource = "Table";

DataBind();
lbResult.Visible = true;
}
catch (Exception exception) {
lbError.Text = exception.Message;
}

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 31 Jul 2006 07:36

System.Web.UI.Page class contains the DataBind() method.
WebForm object is being forced to databind.

Post Reply