TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
soumya p n
NA
41
0
Adding child control to dropdownlist control
Apr 1 2008 8:07 AM
Hello,
I need to add child control(a textbox) based on the selected value of the dropdown list.I have done something like
private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
if(DropDownList1.SelectedIndex==4)
{
TextBox txt = new TextBox();
DropDownList1.Controls.Add(txt);
}
}
The above code gives the error saying,
'System.Web.UI.WebControls.DropDownList' does not allow child controls.
Any Help..?????
Thanks
Regards,
Soumya
Reply
Answers (
3
)
Does presence (or absence) of global.asax affect the session ID?
Can different apps store their session state in different databases on the same SQL server?