drop down list change event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey all,

I was wondering againg...on my ASP.NET app I have a drop down list. I've set
the control to AutoPostBack=True. 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
 
Well, if you want it to cause a postback (and fire the SelectedIndexChanged
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=False. 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.
 
thanks.

Philip Rieck said:
Well, if you want it to cause a postback (and fire the SelectedIndexChanged
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=False. 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.
 
thank you.


Philip Rieck said:
Well, if you want it to cause a postback (and fire the SelectedIndexChanged
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=False. 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,

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.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Me.DropDownList1.AutoPostBack = True
End If
End Sub
Private Sub DropDownList1_SelectedIndexChanged _
(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles DropDownList1.SelectedIndexChanged
TextBox1.Text = DropDownList1.SelectedItem.ToString
End Sub
///
Maybe this helps still something

Cor
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top