drop down list change event

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rodchar

    drop down list change event

    Hey all,

    I was wondering againg...on my ASP.NET app I have a drop down list. I've set
    the control to AutoPostBack=Tr ue. When I run this app, I select something out
    of the drop down list and the screen flickers I guess it indicates that the
    PostBack has occurred. Is this the accepted behavior?

    thanks,
    rodchar
  • Philip Rieck

    #2
    Re: drop down list change event

    Well, if you want it to cause a postback (and fire the SelectedIndexCh anged
    event) every time a new item is selected, then yes, this is the correct
    behavior.

    If you do not want a postback on every single selection, set
    AutoPostBack=Fa lse. I personally recommend that you try to make your
    application behave this way - postbacks on selection, change, etc. should be
    considered a "last resort" on a wep page. Not that they don't have correct
    uses, but overuse can kill your usability and performance.

    "rodchar" <rodchar@discus sions.microsoft .com> wrote in message
    news:3B4AA302-81E4-462E-AFEB-7716B390F2D5@mi crosoft.com...[color=blue]
    > Hey all,
    >
    > I was wondering againg...on my ASP.NET app I have a drop down list. I've
    > set
    > the control to AutoPostBack=Tr ue. When I run this app, I select something
    > out
    > of the drop down list and the screen flickers I guess it indicates that
    > the
    > PostBack has occurred. Is this the accepted behavior?
    >
    > thanks,
    > rodchar[/color]


    Comment

    • rodchar

      #3
      Re: drop down list change event

      thanks.

      "Philip Rieck" wrote:
      [color=blue]
      > Well, if you want it to cause a postback (and fire the SelectedIndexCh anged
      > event) every time a new item is selected, then yes, this is the correct
      > behavior.
      >
      > If you do not want a postback on every single selection, set
      > AutoPostBack=Fa lse. I personally recommend that you try to make your
      > application behave this way - postbacks on selection, change, etc. should be
      > considered a "last resort" on a wep page. Not that they don't have correct
      > uses, but overuse can kill your usability and performance.
      >
      > "rodchar" <rodchar@discus sions.microsoft .com> wrote in message
      > news:3B4AA302-81E4-462E-AFEB-7716B390F2D5@mi crosoft.com...[color=green]
      > > Hey all,
      > >
      > > I was wondering againg...on my ASP.NET app I have a drop down list. I've
      > > set
      > > the control to AutoPostBack=Tr ue. When I run this app, I select something
      > > out
      > > of the drop down list and the screen flickers I guess it indicates that
      > > the
      > > PostBack has occurred. Is this the accepted behavior?
      > >
      > > thanks,
      > > rodchar[/color]
      >
      >
      >[/color]

      Comment

      • rodchar

        #4
        Re: drop down list change event

        thank you.


        "Philip Rieck" wrote:
        [color=blue]
        > Well, if you want it to cause a postback (and fire the SelectedIndexCh anged
        > event) every time a new item is selected, then yes, this is the correct
        > behavior.
        >
        > If you do not want a postback on every single selection, set
        > AutoPostBack=Fa lse. I personally recommend that you try to make your
        > application behave this way - postbacks on selection, change, etc. should be
        > considered a "last resort" on a wep page. Not that they don't have correct
        > uses, but overuse can kill your usability and performance.
        >
        > "rodchar" <rodchar@discus sions.microsoft .com> wrote in message
        > news:3B4AA302-81E4-462E-AFEB-7716B390F2D5@mi crosoft.com...[color=green]
        > > Hey all,
        > >
        > > I was wondering againg...on my ASP.NET app I have a drop down list. I've
        > > set
        > > the control to AutoPostBack=Tr ue. When I run this app, I select something
        > > out
        > > of the drop down list and the screen flickers I guess it indicates that
        > > the
        > > PostBack has occurred. Is this the accepted behavior?
        > >
        > > thanks,
        > > rodchar[/color]
        >
        >
        >[/color]

        Comment

        • Cor Ligthert

          #5
          Re: drop down list change event

          Rodchar,

          Real live or in your test situation, in the last situation the answer is no,
          there was another question about this that I answered today and I forget
          that I had planned to do this to you to when I tested that, I did not see
          it.

          The screen was as flat as flat could be with this code (I filled the
          collection with 6 items and no values)
          \\\
          Private Sub Page_Load(ByVal sender As System.Object, _
          ByVal e As System.EventArg s) Handles MyBase.Load
          If Not IsPostBack Then
          Me.DropDownList 1.AutoPostBack = True
          End If
          End Sub
          Private Sub DropDownList1_S electedIndexCha nged _
          (ByVal sender As System.Object, ByVal e As System.EventArg s) _
          Handles DropDownList1.S electedIndexCha nged
          TextBox1.Text = DropDownList1.S electedItem.ToS tring
          End Sub
          ///
          Maybe this helps still something

          Cor


          Comment

          Working...