Hello,
I am very confused. Here is my situation: I have a web form with a few
fields in place that are used as search criteria for a SQL database. Since I
want the search criteria to be specific, I allow users to select values from
a dropdown list, and add them to a listbox. When the users selects a value
from the dropdown list and clicks "add", the page posts back very quickly and
adds the value into the listbox. This works as it should. When I run the
query, I get back a set of data, I format the data how I want it and display
it in a label. I know a datagrid would be simpler, but for the time being, I
need it to be displayed in a label. Anyway, this all works fine, here is my
problem. lets say the search takes 5 seconds to complete (huge database).
If after the initial query, I try and add some other search values to the
listbox, the post back event to add the new value now takes 5 seconds. It is
almost like clicking the "add" button is re-running the query again, before
adding the selected values to a listbox? I have anothe search page that
searches using the indexing service and the same thing occurs. When I debug
the application, the long delay seems to be occuring during the
InitializeComponent() function within the Page_Init Sub. Any help here would
be greatly appreciated.
MoeH
Karl Seguin - 19 Oct 2005 14:07 GMT
The search isn't happening again (you can double check this by profiling
yoru database). My guess is that your page is having to reconstruct a lot
of information (namely the viewstate). add Trace="True" to your @Page
directive and look for a huge viewstate...
Karl

Signature
MY ASP.Net tutorials
http://www.openmymind.net/
> Hello,
> I am very confused. Here is my situation: I have a web form with a
[quoted text clipped - 29 lines]
>
> MoeH
Remy - 19 Oct 2005 14:11 GMT
Maybe a postback happens when you use your dropdown. Check the
AutoPostBack in the dropdown element, it should be set to false. You
can also just set a breakpoint in the method that calles the search
query and see when it is called.
Remy Blaettler
www.collaboral.com