I have a gridview and a dropdown dd1. The gridview's data is retrieved from database based on a selected value in dd1. So I have to set the gridview's datasource dynamically. It works fine but it requires more code behind to handle edit and delete events. I'm wondering if there's a better way to do this such as setting the gridview's datasource declaratively and use <asp:ObjectDataSource> and its SelectMethod attribute to specify the method that retrieves the data from database. I don't know what to set TypeName to and how to create that type.
...
Go to the complete details ...