Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 6th, 2005, 01:43 PM
Registered User
 
Join Date: Jan 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default postback issue with drop downlists

I have a problem with which I am struggling for many days.
I have a page which has six drop down list (which are webform elements and not html elements). Auto postback property is enabled for all the elements. The data in the dropdown lists are related in a hierarical fashion. Now to give you the general idea of the working of the page, suppose, When the client changes the selection in any of lists in the page (say list number 2), it updates the items of the subsequent lists (that is lists 3, 4, 5, 6). The process is database intensive, so it takes quite a while before any results comes up.
What I want is to prevent the client from changing the selection before their previous request is serviced, by disabling the dropdown lists in the page.
I am trying to use Javascript to disable the lists by adding a "OnChange" attribute to the dropdown list, in the Page_Load event of the page.
            ddllist1.Attributes.Add("OnChange", "disable();")
            ddllist2.Attributes.Add("OnChange", "disable();")
        ...........
            ddllist6.Attributes.Add("OnChange", "disable();")
The disable function is defined on the <Head> of the aspx page. Now the trouble is, this "OnChange" event is suppressing the "OnSelectedIndexChanged" event of the dropdown lists!! So though the lists are getting disabled, when the client is changing the selection, the code in the "OnSelectedIndexChanged" is not executing and the lists are not getting updated.
Please suggest.


 
Old January 9th, 2005, 09:42 PM
Authorized User
 
Join Date: Mar 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
Why don't you use "ddllist1.enabled = false" in your OnSelectedIndexChanged event instead of using javascript "onchange"?






Similar Threads
Thread Thread Starter Forum Replies Last Post
ajax drop downlists msathyaprasad90 ASP.NET 1.0 and 1.1 Professional 1 June 28th, 2006 02:54 AM
drop down with large data on postback gives error madhusrp ASP.NET 1.0 and 1.1 Professional 5 March 16th, 2006 02:55 AM
postback issue with drop downlists emachines ADO.NET 3 March 26th, 2005 01:36 PM
postback issue with drop downlists with javascript emachines Javascript 3 January 24th, 2005 06:54 AM
postback issue with drop downlists with javascript emachines Javascript How-To 1 January 6th, 2005 01:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.