Solved

Page hangs after postback

Posted on 2007-11-14
5
1,036 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
A short film showing how OnPage and Connectwise integration works.

919 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now