473,395 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Why ddlUser_SelectedIndexChanged() event did not work?

Hello, friends,

In my asp.net 1.1 app, I had a dropdownlist web control. It was populated
with user names. I then implemented its

private void ddlUser_SelectedIndexChanged(object sender, System.EventArgs e)

event. In this event, based on user's selection, all available items for
this selected user will be populated in a list box:

this.lstAvailable.Items.Clear();
foreach (System.Data.DataRow dr in mDataSet.Tables[0].Rows)
{
this.lstAvailable.Items.Add(new ListItem(dr["name"].ToString(),
dr["itemID"].ToString()));
}

However, after dropdownlist was populated and one selected a user, this
event was NOT raised. As a result, the available items for this selected user
didn't show in list box.

I then checked the HTML code for this page, I did NOT see onclick() or other
event for the <SELECT> element in those code.

I could not understand: I thought asp.net would generate all these for me.

Any reference paper, sample source code? Thanks a lot.
Apr 23 '06 #1
1 974
Did you set AutoPostBack to true?

Eliyahu

"Andrew" <An****@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...
Hello, friends,

In my asp.net 1.1 app, I had a dropdownlist web control. It was populated
with user names. I then implemented its

private void ddlUser_SelectedIndexChanged(object sender, System.EventArgs
e)

event. In this event, based on user's selection, all available items for
this selected user will be populated in a list box:

this.lstAvailable.Items.Clear();
foreach (System.Data.DataRow dr in mDataSet.Tables[0].Rows)
{
this.lstAvailable.Items.Add(new ListItem(dr["name"].ToString(),
dr["itemID"].ToString()));
}

However, after dropdownlist was populated and one selected a user, this
event was NOT raised. As a result, the available items for this selected
user
didn't show in list box.

I then checked the HTML code for this page, I did NOT see onclick() or
other
event for the <SELECT> element in those code.

I could not understand: I thought asp.net would generate all these for me.

Any reference paper, sample source code? Thanks a lot.

Apr 24 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andy Read | last post by:
Hello all, I have the requirement to produce source code that produces an object hierarchy. Example: Root | Folder 1
3
by: boxboy | last post by:
I am hoping someone from Microsoft could shed some insight into this question. Why did microsoft decide to use a verb based naming convtion for events rather such as Close and Click for rather...
8
by: Mark | last post by:
Hi, I'm looking for some ideas on how to build a very simple Event processing framework in my C++ app. Here is a quick background ... I'm building a multithreaded app in C++ (on Linux) that...
4
by: Pai | last post by:
hello there, I am trying to rersize the window it works find in IE but doea not work with mozilla window.attachEvent(onload,MWSOnLoad); window.onload = function (MWSOnLoad) { alert('hello');...
9
by: VK | last post by:
My original idea of two trains, however pictural it was, appeared to be wrong. The truth seems to be even more chaotic. IE implements its standard down-up model: any mouse event goes from the...
18
by: Elder Hyde | last post by:
Hey all, A class of mine needs to tell the outside world when its buffer is not empty. The problem is that C# seems to force you to put the event-raising code in the base class. To illustrate,...
41
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
0
by: lechatthierry | last post by:
Is it possible to block a mouse event on an Hyperlink with a general script event? This is quite troublesome for me. I am trying to find a way to block the windows shortcut SHIFT + MOUSE LEFT...
1
by: Neko | last post by:
Is it possible to block a mouse event on an Hyperlink with a general script event? This is quite troublesome for me. I am trying to find a way to block the windows shortcut SHIFT + MOUSE LEFT...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.