Hi Friends,

How can I change the Command Text based on a Control event like clicking a button? I want to change the sql query on clicking a button.

Any help is appreciated.

Thanks in advance

Hi,

Why u need to change a query altogether ? Instead why dont write a different method? Or use the concept of method overloading / method overriding as the case may be...?
Can u please elaborate?

Thanks for the quick reply.

I have a dataset which will get loaded in the Cache when I click on Button_1. And when I Click on Button_2 I need another query to be executed and return data from the cache. This is my requirement. Please help.

You can write a different query on the click of Button_2 which retrives the data from cache?? Will this wont work?

You can write a different query on the click of Button_2 which retrives the data from cache?? Will this wont work?

I had a lots of search which did not help me to come up with a solution for retrieving the data from cache. If you could post a sample code that will be truly helpful.

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.