dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: OnSelectedIndexChange event

  1. #1
    Rosmic Guest

    OnSelectedIndexChange event


    I have a problem with the OnSelectedIndexChange event of a DropDownList, the
    thing is that i need it to run a sub when the selected item changes, and
    it seems like there is no sub behind it, can anybody help me, please?

    Thanks in advance

    Rosmic Velásquez

  2. #2
    Russell Jones Guest

    Re: OnSelectedIndexChange event

    You can force the event to fire on the server when the selected item changes
    by setting the AutoPostBack property for the DropDownList control to True.
    However, you should be aware that doing so causes a postback every time the
    item changes, so if the dropdown list gets the focus when the page loads, a
    user holding down an arrow key will scroll through the items in the control,
    posting multiple requests. Depending on the application, that may cause
    other problems, where values aren't present, or the user wasn't ready to
    post the entered or selected values. Usually, you're better off not setting
    the AutoPostBack property and creating some other condition for posting the
    form.

    "Rosmic" <rosmicv@hotmail.com> wrote in message news:3d47fcc3@10.1.10.29...
    >
    > I have a problem with the OnSelectedIndexChange event of a DropDownList,

    the
    > thing is that i need it to run a sub when the selected item changes, and
    > it seems like there is no sub behind it, can anybody help me, please?
    >
    > Thanks in advance
    >
    > Rosmic Velásquez




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center