Dropdownlist Autopostback not working

Discussion in 'ASP .Net' started by =?Utf-8?B?aW5kaWdhdG9y?=, Mar 16, 2006.

  1. I am using ASP.NET 2.0. I have 2 dropdownlists in my page. One holds the list
    of all the countries and other holds the list of all States. When the user
    selects the country as United States, I want the second dropdownlist to show
    all the states in US, otherwise I want the state dropdown to be disabled. For
    this, I set the Autopostback property of country dropdown to true. I
    double-clicked on the selected index changed event in the properties and
    wrote the code to display the appropriate states in the state dropdownlist.
    But whenever I change the selection in the country dropdown, nothing happens.
    I put a debug point in the selectedindexchanged event, but it doesnt go there
    at all. The EnableViewState of the country dropdown is also true.

    I created a new project and tested this with a simple web page. It still
    doesn't work!!

    Is there any setting other than Autopostback that I need to set?

    Thanks in advance for your help.
    =?Utf-8?B?aW5kaWdhdG9y?=, Mar 16, 2006
    #1
    1. Advertising

  2. Client Scripting was disabled in my browser. When I enabled it, it worked!

    "indigator" wrote:

    > I am using ASP.NET 2.0. I have 2 dropdownlists in my page. One holds the list
    > of all the countries and other holds the list of all States. When the user
    > selects the country as United States, I want the second dropdownlist to show
    > all the states in US, otherwise I want the state dropdown to be disabled. For
    > this, I set the Autopostback property of country dropdown to true. I
    > double-clicked on the selected index changed event in the properties and
    > wrote the code to display the appropriate states in the state dropdownlist.
    > But whenever I change the selection in the country dropdown, nothing happens.
    > I put a debug point in the selectedindexchanged event, but it doesnt go there
    > at all. The EnableViewState of the country dropdown is also true.
    >
    > I created a new project and tested this with a simple web page. It still
    > doesn't work!!
    >
    > Is there any setting other than Autopostback that I need to set?
    >
    > Thanks in advance for your help.
    =?Utf-8?B?aW5kaWdhdG9y?=, Mar 16, 2006
    #2
    1. Advertising

  3. =?Utf-8?B?aW5kaWdhdG9y?=

    Bruce Barker Guest

    you need to enable client script in the browser.

    "indigator" <> wrote in message
    news:...
    >I am using ASP.NET 2.0. I have 2 dropdownlists in my page. One holds the
    >list
    > of all the countries and other holds the list of all States. When the user
    > selects the country as United States, I want the second dropdownlist to
    > show
    > all the states in US, otherwise I want the state dropdown to be disabled.
    > For
    > this, I set the Autopostback property of country dropdown to true. I
    > double-clicked on the selected index changed event in the properties and
    > wrote the code to display the appropriate states in the state
    > dropdownlist.
    > But whenever I change the selection in the country dropdown, nothing
    > happens.
    > I put a debug point in the selectedindexchanged event, but it doesnt go
    > there
    > at all. The EnableViewState of the country dropdown is also true.
    >
    > I created a new project and tested this with a simple web page. It still
    > doesn't work!!
    >
    > Is there any setting other than Autopostback that I need to set?
    >
    > Thanks in advance for your help.
    Bruce Barker, Mar 16, 2006
    #3
  4. =?Utf-8?B?aW5kaWdhdG9y?=

    sam Guest

    viewstate has to be enabled for autopostback to work.
    sam, Mar 17, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neo
    Replies:
    1
    Views:
    484
    avnrao
    Jun 24, 2004
  2. Daniel Doyle
    Replies:
    1
    Views:
    608
    Steve Caliendo
    Jun 25, 2004
  3. Ron

    Autopostback not working

    Ron, Aug 25, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    3,895
    Juan Romero
    Aug 26, 2004
  4. =?Utf-8?B?c3Jp?=
    Replies:
    5
    Views:
    4,561
    =?Utf-8?B?c3Jp?=
    Aug 23, 2005
  5. Carlos
    Replies:
    1
    Views:
    330
Loading...

Share This Page