Web Browser Control cookies
Hey,
I am using a combobox to show the URL you are at on the webbrowser control, and I made it so that when you press the Go button it will add the Url to the Combobox list...
WebBrowser thiswebpage = GetCurrentWebBrowser();// Get the currently displayed WebBrowserURLtextbox.Items.Add(thiswebpage.Document.Url);
But wehn I look at the combobox it has the webpage URL you were jsut at about 10 or more times in a row...So it is saving the cookies more then once, how do I fix this?
Thanks :)
look through the collection of objects stored in the list according to the solution I had provided you via email.
So, for each element in the array, if current element.url does not equal URLTextbox.Text, add to collection.
Hmmm, What event did you put it in the Form1.cs code? becuase I could not find it...
Well what you told me gave me an idea of what it should be like...so would this work?
if (URLtextbox.Items.Contains(URLtextbox.Text)){
URLtextbox.Items.Add(thiswebpage.Document.Url.ToString());
//Add the URL to combobox}
I got no errors with it so...I am assuming it would...
Thanks :)
LOL,
ok, ya thats funny, I gotta watch what I code in more carfully, I better make it add it in else
Thanks :)