![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | VB.NET: dynamically change SqlDataSource SelectCommand and re-exec I want to know if it's possible to dynamically change the query, SelectCommand, of a SqlDataSource and then re-execute the query. Then reload the GridView with different data. My situation is a page needs two links above a GridView. One link to export the current location's data (already in the GridView) and the second link to export the data from all locations (requiring a new query and refresh of the GridView). Is this possible in VB.NET/ASP.NET? It already is being done using another programing application, but we required to stop using the other one soon. Thanks! |
My System Specs![]() |
| | #2 (permalink) |
| | Re: VB.NET: dynamically change SqlDataSource SelectCommand and re-exec Mike, It depends if you are creating your program mainly by code or by drag and drop. As you use code, then there is not any problem to fulfil what you ask, it is even quiet easy. (Don't forget to clear your datasources as the datatable or whatever). Are you using drag and drop, then there are some protected areas, which have to be overcome, and which cost mostly more trouble then that you did more in code. Cor "Mike J." <Mike J.@xxxxxx> wrote in message news E39D28A-BE6E-466C-9F19-0407B7359CF3@xxxxxxQuote: >I want to know if it's possible to dynamically change the query, > SelectCommand, of a SqlDataSource and then re-execute the query. Then > reload > the GridView with different data. > > My situation is a page needs two links above a GridView. One link to > export > the current location's data (already in the GridView) and the second link > to > export the data from all locations (requiring a new query and refresh of > the > GridView). > > Is this possible in VB.NET/ASP.NET? It already is being done using > another > programing application, but we required to stop using the other one soon. > > Thanks! |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Sqldatasource Update | .NET General | |||
| How to reset the SelectCommand of a SqlDataSource on the client(JavaScript)? | .NET General | |||
| GridView not Updating Through SqlDataSource | .NET General | |||
| newbie question on SqlDataSource object | .NET General | |||
| Can't exec a program from another | Vista security | |||