Hi,
I am going to create two aspx pages.
The first page will display the whole content of a table which is from a DataSet.
The second page will only display few selected columns of the table.
My questions are
1) How can the contents in the second page be binded with the datasource?
Suppose I don't want to create the second table.
2) How can I pass the data source from the first page to the second page?
Thanks.
I am going to create two aspx pages.
The first page will display the whole content of a table which is from a DataSet.
Code:
DataSet myDataSet = new DataSet();
try
{
myConnection.Open();
// create the data
GenerateDataSet(myDataSet, myConnection);
}
finally
{
myConnection.Close();
// bind each to table to a grid
GridView1.DataSource = myDataSet.Tables["Weather"];
}
// databind the page
GridView1.DataBind();
My questions are
1) How can the contents in the second page be binded with the datasource?
Suppose I don't want to create the second table.
2) How can I pass the data source from the first page to the second page?
Thanks.
Comment