Solved

Page hangs after postback

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

828 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