Search:
Namespaces
Discussions
.NET v1.1
Feedback
SelectedIndexChanged event not firing correctly
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngvb' list
.
Asim Ahmed
I am having problems with the dropdownlist box. When a selection in the =
dropdown box changes, I want to load another dropdownlist box from the =
database based on that selection.=20
For this the only relevant event is the SelectedIndexChanged event. But =
this doesn't seem to fire unless you have another button to reload the =
page. How do you get around that.=20
Should have ben simple. User selects from the first list box, the second =
box loads with data based on his selection. I know its possible. What am =
I missing here.
Thanks for any help in advance.
Asim
-----Original Message-----
From: Eric Landes [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 8:33 AM
To: aspngvb
Subject: [aspngvb] Dynamically Adding Controls to an aspx page
Folks,
I currently have a page set up that dynamically adds controls to a web =
page
(textbox, and calendars, also labels). The controls are adding =
correctly. =20
My issue is placement. Basically I place a label, then the textbox, or
calendar control after the label. I want a line break between each of
these, but have not figured out how to do this. Any ideas? I tried
creating a literal with "<br>" as the text, but that doesnt work. Below =
is
the code:
dim oEntry as new textbox()
dim oLiteral as literal()
dim oLabel as new
Label
()
oliteral.Text =3D "<br>"
Controls.Add(oLabel)
Controls.Add(oLiteral)
Controls.Add(oEntry)
Controls.Add(oLiteral)
The label still displays on the same line as the textbox.
Any ideas? TIA
*************************=20
Eric Landes=20
Senior Programmer/Analyst (Partners Health Plan)=20
For Articles on Crystal.Net, Datagrids and more check out
http://www.aspalliance.com/corporatecoder/
*************************=20
All statements expressed are my own, and do not reflect the opinion of =
my
employer, unless stated otherwise.=20
Confidentiality Notice: This e-mail message, including any
attachments, is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
PARTNERS Health Plan Phone: 574-233-4899
100 E. Wayne St., Suite 502 Fax: 574-234-7484
South Bend, IN 46601 www.partnersindiana.com
| [aspngvb] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
=3D JOIN/QUIT
Reply to this message...
Bryan Costanich
Have you set AutoPostBack="True" on your DropDownList?
-----Original Message-----
From: Asim Ahmed [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 8:47 AM
To: aspngvb
Subject: [aspngvb] SelectedIndexChanged event not firing correctly
I am having problems with the dropdownlist box. When a selection in the
dropdown box changes, I want to load another dropdownlist box from the
database based on that selection.
For this the only relevant event is the SelectedIndexChanged event. But this
doesn't seem to fire unless you have another button to reload the page. How
do you get around that.
Should have ben simple. User selects from the first list box, the second box
loads with data based on his selection. I know its possible. What am I
missing here.
Thanks for any help in advance.
Asim
-----Original Message-----
From: Eric Landes [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 8:33 AM
To: aspngvb
Subject: [aspngvb] Dynamically Adding Controls to an aspx page
Folks,
I currently have a page set up that dynamically adds controls to a web page
(textbox, and calendars, also labels). The controls are adding correctly.
My issue is placement. Basically I place a label, then the textbox, or
calendar control after the label. I want a line break between each of
these, but have not figured out how to do this. Any ideas? I tried
creating a literal with "<br>" as the text, but that doesnt work. Below is
the code:
dim oEntry as new textbox()
dim oLiteral as literal()
dim oLabel as new
Label
()
oliteral.Text = "<br>"
Controls.Add(oLabel)
Controls.Add(oLiteral)
Controls.Add(oEntry)
Controls.Add(oLiteral)
The label still displays on the same line as the textbox.
Any ideas? TIA
*************************
Eric Landes
Senior Programmer/Analyst (Partners Health Plan)
For Articles on Crystal.Net, Datagrids and more check out
http://www.aspalliance.com/corporatecoder/
*************************
All statements expressed are my own, and do not reflect the opinion of my
employer, unless stated otherwise.
Confidentiality Notice: This e-mail message, including any
attachments, is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
PARTNERS Health Plan Phone: 574-233-4899
100 E. Wayne St., Suite 502 Fax: 574-234-7484
South Bend, IN 46601 www.partnersindiana.com
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
Reply to this message...
Asim Ahmed
Yes its set to true
Asim
-----Original Message-----
From: Bryan Costanich [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 11:46 AM
To: aspngvb
Subject: [aspngvb] RE: SelectedIndexChanged event not firing correctly
Have you set AutoPostBack=3D"True" on your DropDownList?
-----Original Message-----
From: Asim Ahmed [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 8:47 AM
To: aspngvb
Subject: [aspngvb] SelectedIndexChanged event not firing correctly
I am having problems with the dropdownlist box. When a selection in the
dropdown box changes, I want to load another dropdownlist box from the
database based on that selection.=20
For this the only relevant event is the SelectedIndexChanged event. But =
this
doesn't seem to fire unless you have another button to reload the page. =
How
do you get around that.=20
Should have ben simple. User selects from the first list box, the second =
box
loads with data based on his selection. I know its possible. What am I
missing here.
Thanks for any help in advance.
Asim
-----Original Message-----
From: Eric Landes [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 8:33 AM
To: aspngvb
Subject: [aspngvb] Dynamically Adding Controls to an aspx page
Folks,
I currently have a page set up that dynamically adds controls to a web =
page
(textbox, and calendars, also labels). The controls are adding =
correctly. =20
My issue is placement. Basically I place a label, then the textbox, or
calendar control after the label. I want a line break between each of
these, but have not figured out how to do this. Any ideas? I tried
creating a literal with "<br>" as the text, but that doesnt work. Below =
is
the code:
dim oEntry as new textbox()
dim oLiteral as literal()
dim oLabel as new
Label
()
oliteral.Text =3D "<br>"
Controls.Add(oLabel)
Controls.Add(oLiteral)
Controls.Add(oEntry)
Controls.Add(oLiteral)
The label still displays on the same line as the textbox.
Any ideas? TIA
*************************=20
Eric Landes=20
Senior Programmer/Analyst (Partners Health Plan)=20
For Articles on Crystal.Net, Datagrids and more check out
http://www.aspalliance.com/corporatecoder/
*************************=20
All statements expressed are my own, and do not reflect the opinion of =
my
employer, unless stated otherwise.=20
Confidentiality Notice: This e-mail message, including any
attachments, is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
PARTNERS Health Plan Phone: 574-233-4899
100 E. Wayne St., Suite 502 Fax: 574-234-7484
South Bend, IN 46601 www.partnersindiana.com
| [aspngvb] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
=3D JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
=3D JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
=3D JOIN/QUIT
Reply to this message...
Bryan Costanich
Post your .aspx code.
-----Original Message-----
From: Asim Ahmed [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 9:25 AM
To: aspngvb
Subject: [aspngvb] RE: SelectedIndexChanged event not firing correctly
Yes its set to true
Asim
-----Original Message-----
From: Bryan Costanich [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 11:46 AM
To: aspngvb
Subject: [aspngvb] RE: SelectedIndexChanged event not firing correctly
Have you set AutoPostBack="True" on your DropDownList?
-----Original Message-----
From: Asim Ahmed [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 8:47 AM
To: aspngvb
Subject: [aspngvb] SelectedIndexChanged event not firing correctly
I am having problems with the dropdownlist box. When a selection in the
dropdown box changes, I want to load another dropdownlist box from the
database based on that selection.
For this the only relevant event is the SelectedIndexChanged event. But this
doesn't seem to fire unless you have another button to reload the page. How
do you get around that.
Should have ben simple. User selects from the first list box, the second box
loads with data based on his selection. I know its possible. What am I
missing here.
Thanks for any help in advance.
Asim
-----Original Message-----
From: Eric Landes [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 8:33 AM
To: aspngvb
Subject: [aspngvb] Dynamically Adding Controls to an aspx page
Folks,
I currently have a page set up that dynamically adds controls to a web page
(textbox, and calendars, also labels). The controls are adding correctly.
My issue is placement. Basically I place a label, then the textbox, or
calendar control after the label. I want a line break between each of
these, but have not figured out how to do this. Any ideas? I tried
creating a literal with "<br>" as the text, but that doesnt work. Below is
the code:
dim oEntry as new textbox()
dim oLiteral as literal()
dim oLabel as new
Label
()
oliteral.Text = "<br>"
Controls.Add(oLabel)
Controls.Add(oLiteral)
Controls.Add(oEntry)
Controls.Add(oLiteral)
The label still displays on the same line as the textbox.
Any ideas? TIA
*************************
Eric Landes
Senior Programmer/Analyst (Partners Health Plan)
For Articles on Crystal.Net, Datagrids and more check out
http://www.aspalliance.com/corporatecoder/
*************************
All statements expressed are my own, and do not reflect the opinion of my
employer, unless stated otherwise.
Confidentiality Notice: This e-mail message, including any
attachments, is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
PARTNERS Health Plan Phone: 574-233-4899
100 E. Wayne St., Suite 502 Fax: 574-234-7484
South Bend, IN 46601 www.partnersindiana.com
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
Reply to this message...
Asim Ahmed
Bryan, thanks for your interest.
Actually this site has the same code, simple format:
http://aspauthors.com/aspnetbyexample/ch06/
Reference 6.4 (third example)
Here as in my case, you need to click on the update button which then =
fires the selecteditemchange event to see the text message in the label.
I want the event to fire and the message to show as soon as the =
selection in the drop down list box is changed.
Again, thanks for your interest.
Asim
-----Original Message-----
From: Bryan Costanich [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 12:40 PM
To: aspngvb
Subject: [aspngvb] RE: SelectedIndexChanged event not firing correctly
Post your .aspx code.=20
-----Original Message-----
From: Asim Ahmed [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 9:25 AM
To: aspngvb
Subject: [aspngvb] RE: SelectedIndexChanged event not firing correctly
Yes its set to true
Asim
-----Original Message-----
From: Bryan Costanich [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 11:46 AM
To: aspngvb
Subject: [aspngvb] RE: SelectedIndexChanged event not firing correctly
Have you set AutoPostBack=3D"True" on your DropDownList?
-----Original Message-----
From: Asim Ahmed [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 8:47 AM
To: aspngvb
Subject: [aspngvb] SelectedIndexChanged event not firing correctly
I am having problems with the dropdownlist box. When a selection in the
dropdown box changes, I want to load another dropdownlist box from the
database based on that selection.=20
For this the only relevant event is the SelectedIndexChanged event. But =
this
doesn't seem to fire unless you have another button to reload the page. =
How
do you get around that.=20
Should have ben simple. User selects from the first list box, the second =
box
loads with data based on his selection. I know its possible. What am I
missing here.
Thanks for any help in advance.
Asim
-----Original Message-----
From: Eric Landes [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 8:33 AM
To: aspngvb
Subject: [aspngvb] Dynamically Adding Controls to an aspx page
Folks,
I currently have a page set up that dynamically adds controls to a web =
page
(textbox, and calendars, also labels). The controls are adding =
correctly. =20
My issue is placement. Basically I place a label, then the textbox, or
calendar control after the label. I want a line break between each of
these, but have not figured out how to do this. Any ideas? I tried
creating a literal with "<br>" as the text, but that doesnt work. Below =
is
the code:
dim oEntry as new textbox()
dim oLiteral as literal()
dim oLabel as new
Label
()
oliteral.Text =3D "<br>"
Controls.Add(oLabel)
Controls.Add(oLiteral)
Controls.Add(oEntry)
Controls.Add(oLiteral)
The label still displays on the same line as the textbox.
Any ideas? TIA
*************************=20
Eric Landes=20
Senior Programmer/Analyst (Partners Health Plan)=20
For Articles on Crystal.Net, Datagrids and more check out
http://www.aspalliance.com/corporatecoder/
*************************=20
All statements expressed are my own, and do not reflect the opinion of =
my
employer, unless stated otherwise.=20
Confidentiality Notice: This e-mail message, including any
attachments, is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
PARTNERS Health Plan Phone: 574-233-4899
100 E. Wayne St., Suite 502 Fax: 574-234-7484
South Bend, IN 46601 www.partnersindiana.com
| [aspngvb] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
=3D JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
=3D JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
=3D JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
=3D JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
=3D JOIN/QUIT
Reply to this message...
Bryan Costanich
That sample isn't using the AutoPostBack.
put AutoPostBack="True" in the <asp:DropDownList tag.
-----Original Message-----
From: Asim Ahmed [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 10:57 AM
To: aspngvb
Subject: [aspngvb] RE: SelectedIndexChanged event not firing correctly
Bryan, thanks for your interest.
Actually this site has the same code, simple format:
http://aspauthors.com/aspnetbyexample/ch06/
Reference 6.4 (third example)
Here as in my case, you need to click on the update button which then fires
the selecteditemchange event to see the text message in the label.
I want the event to fire and the message to show as soon as the selection in
the drop down list box is changed.
Again, thanks for your interest.
Asim
-----Original Message-----
From: Bryan Costanich [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 12:40 PM
To: aspngvb
Subject: [aspngvb] RE: SelectedIndexChanged event not firing correctly
Post your .aspx code.
-----Original Message-----
From: Asim Ahmed [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 9:25 AM
To: aspngvb
Subject: [aspngvb] RE: SelectedIndexChanged event not firing correctly
Yes its set to true
Asim
-----Original Message-----
From: Bryan Costanich [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 11:46 AM
To: aspngvb
Subject: [aspngvb] RE: SelectedIndexChanged event not firing correctly
Have you set AutoPostBack="True" on your DropDownList?
-----Original Message-----
From: Asim Ahmed [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 8:47 AM
To: aspngvb
Subject: [aspngvb] SelectedIndexChanged event not firing correctly
I am having problems with the dropdownlist box. When a selection in the
dropdown box changes, I want to load another dropdownlist box from the
database based on that selection.
For this the only relevant event is the SelectedIndexChanged event. But this
doesn't seem to fire unless you have another button to reload the page. How
do you get around that.
Should have ben simple. User selects from the first list box, the second box
loads with data based on his selection. I know its possible. What am I
missing here.
Thanks for any help in advance.
Asim
-----Original Message-----
From: Eric Landes [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 8:33 AM
To: aspngvb
Subject: [aspngvb] Dynamically Adding Controls to an aspx page
Folks,
I currently have a page set up that dynamically adds controls to a web page
(textbox, and calendars, also labels). The controls are adding correctly.
My issue is placement. Basically I place a label, then the textbox, or
calendar control after the label. I want a line break between each of
these, but have not figured out how to do this. Any ideas? I tried
creating a literal with "<br>" as the text, but that doesnt work. Below is
the code:
dim oEntry as new textbox()
dim oLiteral as literal()
dim oLabel as new
Label
()
oliteral.Text = "<br>"
Controls.Add(oLabel)
Controls.Add(oLiteral)
Controls.Add(oEntry)
Controls.Add(oLiteral)
The label still displays on the same line as the textbox.
Any ideas? TIA
*************************
Eric Landes
Senior Programmer/Analyst (Partners Health Plan)
For Articles on Crystal.Net, Datagrids and more check out
http://www.aspalliance.com/corporatecoder/
*************************
All statements expressed are my own, and do not reflect the opinion of my
employer, unless stated otherwise.
Confidentiality Notice: This e-mail message, including any
attachments, is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
PARTNERS Health Plan Phone: 574-233-4899
100 E. Wayne St., Suite 502 Fax: 574-234-7484
South Bend, IN 46601 www.partnersindiana.com
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
Reply to this message...
System.Reflection.Emit.Label
System.Web.UI.MobileControls.Label
System.Web.UI.WebControls.DropDownList
System.Web.UI.WebControls.Label
System.Windows.Forms.Label
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com