It may be how you structured your code.

In your page load you would have code like:

if (!Page.IsPostBack)
{
  // Do stuff here that should happen when it is not a post back
  // for example, I call functions that populate drop-downs, here
}

Does this make sense to you?

On Tue, Sep 30, 2008 at 8:55 AM, Wendell <[EMAIL PROTECTED]> wrote:

>
> IsPostBack may be a solution. These queries fire even if I click a
> button that has nothing to do with the gridview. what should I put
> inside the IsPostBack to prevent them from running?
>
>
> On Sep 29, 3:55 pm, AstroDrabb <[EMAIL PROTECTED]> wrote:
> > Google Page.IsPostBack.
> >
> >
> >
> > On Mon, Sep 29, 2008 at 11:26 AM, Wendell <[EMAIL PROTECTED]>
> wrote:
> >
> > > Hi,
> > > I'm running ASP.NET 2.0. I have a gridview with parameters bound to
> > > page web controls through the Configure Data Source Wizard. It uses an
> > > SQLDataSource.
> >
> > > The subtotals I was doing in the RowDataBound event of the gridview
> > > weren't adding up. I found that when the dropdownlist selection
> > > changed, the gridview ran the previous query first and then the query
> > > based on the new dropdownlist value. Is there a way to configure the
> > > datasource so that this won't happen?
> >
> > > Thanks,
> > > Wendell- Hide quoted text -
> >
> > - Show quoted text -
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web 
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
 <p><a href="http://feeds.feedburner.com/DotNetDevelopment";><img 
src="http://feeds.feedburner.com/~fc/DotNetDevelopment?bg=99CCFF&amp;fg=444444&amp;anim=1";
 height="26" width="88" style="border:0" alt="" /></a></p>
-~----------~----~----~----~------~----~------~--~---

Reply via email to