I want to take a field from a table and place the content into a collection. The collection is not supposed to have any duplicates. This is my code sofar... It does not work. The NOT statement is supposed to only enter values into the collection, when the collection does not allready contain the matching string.
I have been doing well and also I am a noob I know it and you know it a lot has started making sense and I am evening figuring new things out without using Google but of course I have hit another snag in my program so here goes
I am waiting for an email to arrive (the page automatically refreshes) and then I want to click the link (I do not need to click to open the email or anything like that) I also have the code to click and navigate to the address reason being it was the only way I could figure out how to stop it opening in a new window on IE
So my only problem is I need a way to check every x seconds for the element and then if its there proceed with my code and if its not wait and then check again or however this is done in VB.If this is not the way its done please point me in the right direction the code I am using to find and then navigate to the link is
Dim emailpageelements As HtmlElementCollection = WebBrowser2.Document.GetElementsByTagName("a") For Each emailver As HtmlElement In emailpageelements If InStr(emailver.InnerHtml, "https://twitter.com/account/confirm_email/") Then WebBrowser1.Navigate(emailver.InnerText)
I would like the following function to return Nothing if the element with the specified key is not in the collection. Instead, it returns an error - something to the effect of "no element found"
Public Class MyCollection Inherits System.Collections.ObjectModel.Collection(Of MyType) Public Function FindByActivityKey(ByVal searchValue As Integer) As MyType
I would like to set up a custom app configuration element collection section like this
<logSectionGroup> <logSection name="Testttt"> <properties name ="Pride">[code]....
Properties would be the configuration element, and log section would be the configuration element collection.The problem is, I've only seen where you can have multiple instances of a single element instead of multiple elements.
I need to bind a textblock.text property to a single element in an observable collection, or array element, and have the text update using the INotifyPropertyChanged or INotifyCollectionChanged, whichever is best.
Most examples describe ways to bind listboxes or other list views to entire collections, but my application needs to update several textblocks on a screen depending on notification of a change in one or more elements of an array.
Is it possible to bind a single textblock to a single array element? Is it possible to get notification of the proper type that will update one or more of the textblocks if any assigned element changes?
Is there a way to check if an element is in the webbrowser1.document ?
I can click the button fine, IF the element is on the page, but sometimes i get to the end page, where i just have the "back" button, and no forward button.[code]...
I'm using HtmlAgilityPack to parse HTML. I want to check if an element has a specific attribute. I want to check whether an <a> tag has the href attribute.
Dim doc As HtmlDocument = New HtmlDocument() doc.Load(New StringReader(content)) Dim root As HtmlNode = doc.DocumentNode Dim anchorTags As New List(Of String) For Each link As HtmlNode In root.SelectNodes("//a") If link.HasAttributes("href") Then doSomething() 'this doesn't work because hasAttributes only checks whether an element has attributes or not Next
I have a number of rewrite rules for a lot of things that I did in IIS7, like removing trailing slashes, canonnical URLs, lowercase lettering, and such. IIS altered my web.config, and everything works fine on the website, like it should. But in the Visual Studio web.config, the opening < rewrite > statement is underlined in blue, and at the bottom of VS, it says that the element 'system.webServer' has invalid child element 'rewrite'. But this is how IIS made it. I didn't do this manually. Should I be concerned with this VS error, or should I just leave as be, since it's working how it should work? Here's an example of my web.config:
Is there a way to control the way a browser behaves such as if I click on this link it doesn't navigate to that link but instead show me the source code behind that button?
I need to randomly pick an element from an array and I can only use that element three times,I can randomly pick the element but how do I go about only using it three times.
I want to be able to reference an element in an array of structures by the name of the element in a visual basic 2010 function. For example
Public Structure myStruct Public element1 as string Public element2 as integer Public element3 as boolean
[code]...
Is it possible to reference a structures element by the element's name in a similar way to that shown above. The code shown above does not work, as the expression obj(i).[elementName] does not work as hoped.
When I click button 1 for the first time I recieve the error "Object reference not set to an instance of an object." but when I click it the second time it returns the elements text perfectly.
I thought the wb.document element might not be instantiated so I've tried navigating to a page (google's homepage) before loading the page I want put with no success.
I also thought that maybe it wasn't giving the page time to load so I added the sub to deal with the documentCompleted event but this also returns nothing (though wb.document.url is set correctly to the webpage I want)
I was looking at a previous post and the poster was talking about htmlelement, so what I want to know is if you can use this function to find a html element on a wb page.I'm trying to make a program that will find the img src url for an image on a website and then return that url to the imagelocation of a picturebox.
Been searching all forums for an answer to this problems for several days now without success.I am trying to Cast/Bind to an HTML Element in an open Internet Explorer 8.0 browser.I need to Cast/Bind to a Frame with a name of "mainFrame".I can get to the Frameset ok but cannot get any further.[code]Can anybody shed any light on how to get HTMLDOC to bind the name part "mainFrame"
i want to add WPF Control to my windows forms application so i need to use element host but i couldn't find WPF Interoperability tab so i tried to add the reference and then add the control but i got this error why? and btw i tried also in C# and i got the same problem
I have a webbrowser and I need some way of putting a picture onto the form in a picturebox or something like that. The thing is.. the image on the web browser always has a different URL but the element id is always "captchaSF_Image"
I have the following code that adds the elements from between the <movie></movie> elements to a listview box.Private Sub ParseMovie(ByVal reader As XmlReader)
[Code]...
What I would like to do is make sure that it reads everything instead of using ReadToFollowing. I might add something else to the xml file, such as <release_date></release_date> and I want to make sure I don't have to edit the ParseMovie sub routine. I looked at the members of XmlReader, but I can't seem to get the right methods to do this efficiently. How should I parse every element between <movie></movie>.
Im trying to create an empty element in an xml file but still want to be able to close other elements without changing the empty element.What XMLTextWrite does to empty elements: <Data> <Feed> <EmptyElement /> </Feed> <Data>
When i use the text writer i cant use <writer>.StartEndElement() it starts to screw with my empty element. When im still having my program write inside feed. Here some code your you to drool over.
My example
Dim Settings As New XmlWriterSettings() Settings.Indent = True
Is it good practice to store sub-collections of item X inside a parent collection of item X for caching 'filter-queries' which are performed on the parent collection? (They won't be used together (as in color AND type).) Or is it also ok to just Loop over the collection and return the correct entities in a temporary collection?
I want to use the filter element that is defined in CSS in order to render some PNGs for use in IE6. Using VS 2008 and creating a style sheet in the Studio I noticed that when I wrote the word filter, it was not recognised by intellisence. Is there a bug in VS 2008? How can I make my app recognise filter? I really need to use this command word in order to render my transparency correctly
I have a question about an array of string and random. I have an arry of string i.e Dim testArrayString() As String = {"Orange", "Apple", "London", "Sydney", "anything"} I want to show the each element of the above array randomly one by one in a message box....and also stores that randomly generated string from that array into an another variable... How would i do that... i have no clue