SQLDataSource Query Run if Gridview is Not Visible?

P

Paul

I have 2 SQLDataSources attached to 2 Gridviews.

The user can select 2 radio buttons. Depending on which is chosen, one of
the gridviews is hidden (i.e. gv.Visible = false") and one is displayed.

My question: Are both SQLDataSource Queries actually executed regardless of
whether they are hidden or not?

In VS2005, I set a breakpoint on the Selected event of the SQLDataSource. It
only gets hit if they select 1 specific radio button - not both of them.

This leads me to believe that both queries do NOT get run every time, and
the Visible property of the Gridview determines with the SQLDataSource is run
or not.

That seems odd to me. But could someone confirm?

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top