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
maheswar reddy
NA
27
46.5k
Dropp Down List
Oct 4 2011 2:11 AM
Hi all,
I am facing problem with drop down list.I am controlling from from one more drop down list.I need to clear
all the items present in second drop down list and add new items my following code is not working .
int n = Convert.ToInt32(DropDownList1.SelectedIndex);
if (n == 0)
{
DropDownList2.Items.Clear();
DropDownList2.Items.Add("B.E");
DropDownList2.Items.Add("M.C.A");
DropDownList2.Items.Add("M.B.A");
}
if (n == 1)
{
DropDownList2.Items.Clear();
DropDownList2.Items.Add("Software engineer");
DropDownList2.Items.Add("Manager");
DropDownList2.Items.Add("Sales excetive");
DropDownList2.Items.Add("System operator");
DropDownList2.Items.Add("Graphics engineer");
}
WHY it is not working?
Suggest me the way.
Reply
Answers (
3
)
Drop Down list control
Visual C# problem, SerialPort DataReceive