Understanding your WEB example?
Posted: 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;
}
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;
}