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
bseos
NA
1
0
Combo box - add only if non existant
Apr 12 2007 12:27 PM
I have just started to get into C# coding as i have just begun my course. I have very basic knowledge so far, but i have a problem getting my combo box to only add items which arnt already added.
i am currently trying to write a basic mini browser which displays the url of the site in the combo box. The combobox is also used to enter urls and also to used as the drop down list to pick out previously visited websites . This part i have done.
But problem is i only want it to add (keep history) the sites which it doesnt have in the list (not to have more than 1 same address listed) and keep the addresses in most recently accessed order in the dropdown combobox from top being most recent.
My coding so far:: (Incase someone wants to see wat i have done)
private void myWebBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
urlCmb.Items.Add(urlCmb.Text);
}
private void goBtn_Click(object sender, EventArgs e)
{
urlCmb.Items.Add(urlCmb.Text);
Reply
Answers (
1
)
Problem with Cystal report
C# beginner question