I am forced to use .NET WebForms wizards for MSc labs. I cannot describe my feelings after Spring on Java, I SUFFER.
When configuring data-source for a GridView I noticed that ConnectionString overwrites itself when you add the second GridView2 and choose the same dataSource as for GridView1 to the server form while changing the SQL to display data from the other table. As a result it makes GridView1 to query the same data as second GridView2..
How does this work? In java dataSource is not bound to any ConnectionString/SQL statement… – we can use it with as many different sql queries as we want , why here it is an issue?
Thanks,
SqlDataSourcecontains select string in itsSelectCommandproperty and connection string in theConnectionStringproperty. So you have to create another datasource for the second GridView or change its properties dynamically in C#.