473,407 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Confused: page postbacks problemn. Please help

Moe
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
Nov 19 '05 #1
2 1040
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

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Moe" <Mo*@discussions.microsoft.com> wrote in message
news:9C**********************************@microsof t.com...
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

Nov 19 '05 #2
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

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g.,...
8
by: Workgroups | last post by:
I've got a page where the nature of the beast is such that the user clicks a submit button to ransomize some data in somewhat rapid succession (once per second, give or take). The page generates a...
2
by: Daniel | last post by:
I'm new to .Net and all of its abilities so I hope this makes sense. Basically I'm confused on when is the appropriate time to use web forms controls vs. regular HTML. For example in ASP...
2
by: Wang | last post by:
Suppose I have three pages A.aspx, B.aspx, and C.aspx. A and B each have a hyperlink that opens C. The hyperlink is identical on A and B, and has no querystring parameters. The user opens A. ...
2
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
6
by: Fred | last post by:
I have implemented a dialog box (an aspx page) using showModalDialog. Because the dialog needs to process postbacks, I have implemented it in a frameset. In the top of the framset page, I have...
4
by: Guadala Harry | last post by:
Just wondering what could cause this: I have observed that when first opening an aspx page, the Page_Load event fires as expected. Then I go to other pages in the site. When returning to any page...
2
by: Diffident | last post by:
Hello All, I have a question which is pertinent to Page's lifecycle. I declared a protected static object (global variable) whose value is set only once when the page is loaded. Will that...
0
by: Roy | last post by:
The following code - straight out of the MSDN help - uses ASP.NET 2.0's Client Callback features, and yet, ALWAYS postback to the page. Why? I expected no postbacks to occur. <%@ Page...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.