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. 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.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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
|
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...
|
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...
|
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');...
|
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...
|
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,...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
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,...
|
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...
|
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...
|
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...
| |