469,342 Members | 5,821 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,342 developers. It's quick & easy.

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=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
Nov 21 '05 #1
4 10431
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" <ro*****@discussions.microsoft.com> wrote in message
news:3B**********************************@microsof t.com...
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

Nov 21 '05 #2
thanks.

"Philip Rieck" wrote:
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" <ro*****@discussions.microsoft.com> wrote in message
news:3B**********************************@microsof t.com...
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


Nov 21 '05 #3
thank you.
"Philip Rieck" wrote:
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" <ro*****@discussions.microsoft.com> wrote in message
news:3B**********************************@microsof t.com...
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


Nov 21 '05 #4
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
Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Filiz Duman | last post: by
3 posts views Thread by Mike Collins | last post: by
7 posts views Thread by callawayglfr | last post: by
5 posts views Thread by Ajith Menon | last post: by
6 posts views Thread by zacks | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.