Solved

Page hangs after postback

Posted on 2007-11-14
5
1,041 Views
Last Modified: 2008-02-01
Hello, everyone!  I have a DetailsView with a DropDownList control inside a TemplateField.  There are also several fields in that record that need to be populated from a different table based on the value selected in the DropDown (they are read-only fields).  I would like to populate these fields on the OnSelectedIndexChanged event of the DropDown control.  However, if I set AutoPostBack="true" for the DropDown the page hangs, even without any data updating.  This is probably because the DetailsView is a child of a GridView on the same page.  Does anyone have a suggestion for how to accomplish what I am trying to do?  

Sophia
0
Comment
Question by:sophianewbie
5 Comments
 
LVL 1

Expert Comment

by:adktd
ID: 20288596
0
 

Author Comment

by:sophianewbie
ID: 20292519
Thanks for your reply.  Unfortunately, the link you provided simply explains how to use a DropDown control in a DetailsView.  I have no problem with that part.  After spending a day on this issue, I finally tracked down the real culprit.  The problem is that my GridView and DetailsView are inside an UpdatePanel.  When I remove the UpdatePanel everything works as expected.  At least I know what causes the hanging, but that doesn't bring me any closer to the solution, since I really need this to be inside an UpdatePanel.

Has anyone heard of problems with AutoPostBack="true" on a DropDownList in a DetailsView inside an UpdatePanel?  For the record, DropDownLists that are not in a DetailsView work just fine inside an UpdatePanel.  If I ever track down what's going on I will post the solution.
0
 

Author Comment

by:sophianewbie
ID: 20301038
Here is a link regarding the same issue.  I tried the hidden button with the Javascript solution in this thread, but the response is still very slow after a DDL selection.  So I still haven't resolved this.

http://forums.asp.net/p/1103779/1683805.aspx
0
 
LVL 33

Accepted Solution

by:
raterus earned 500 total points
ID: 20450565
How much data is on this page?  If this is a very large gridview/detailsview, your viewstate might be incredibly large, and that has to be sent back to the server each time, causing the page to hang.  Just a thought.

Another thing you might try is to nest updatepanels so you are only refreshing the data you care about, this may or may not work here.
0
 
LVL 26

Expert Comment

by:Rejojohny
ID: 20457363
can you please post some code, esp of the page load and the seleted index changed event .. can you debug and confirm that the event is actually getting called? can you debug and check where exactly is it hanging, i mean is it before the event or is the request not event coming to the server or is after the event code is completed? if the event is not even getting called, maybe you want to add brekpoints in the global.asax events and see if the request is even getting to server or not ....

Rejo
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Turn on intranet settings 1 57
Reset asp.net login password 4 42
Code works but it's slow 28 71
jQuery - following an example but can I save data server side? 20 50
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question