private void BindSqlDataSources() { SqlDataSourceCustomer.SelectCommand = String.Format("SELECT TOP 1 * FROM [Customers] WHERE CustomerID={0}", int.Parse(textCustomerID.Text)); SqlDataSourceCustomer.DataBind(); TechSupportDataSource.SelectCommand = String.Format("SELECT * FROM [Incidents] WHERE CustomerID={0}", int.Parse(textCustomerID.Text)); TechSupportDataSource.DataBind(); }
private void BindSqlDataSources() { TechSupportDataSource.SelectCommand = "SELECT [ProductCode], [Name], [Version], [ReleaseDate] FROM [Products]"; TechSupportDataSource.DataBind(); GridViewProducts.DataBind(); Response.Redirect(Request.RawUrl); }