Understanding your WEB example?

Understanding your WEB example?

Postby 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;
}
davidkennedy
 
Posts: 18
Joined: Fri 07 Jul 2006 16:21

Postby Alexey » Mon 31 Jul 2006 07:36

System.Web.UI.Page class contains the DataBind() method.
WebForm object is being forced to databind.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for MySQL