I'm making a bot to auto-reply to my PMs on a website, and I'd like to get all of the HTML elements with a class name 'InboxRow'. I can get the HTML element one at time, but the problem is that these will be dynamic, so the id and amt. of them will always change, so I want to put them in an array, where I can call each one up and perform the rest of my code for it. I just can't seem to be able to figure out how to find all the HTML elements with the class name and put them in an array, and I can't seem to find any tutorials online
I created a method and pass the element type, id, and any inner text that instantiates a new html element. The last statement: Me.Controls.Add(element) adds it to the end of the page, but I would like it to be inserted in a specific position (between 2 divs within a form). What I am describing is very similar to this post on SO here, although it was for javascript.
This is probably a really basic question - but I have a list of items (custom objects) being passed from one winform (.net 3.5) to another. I want to create a local list to store changes that only get persisted if the user clicks save. Currently if the user clicks cancel - the changes are still applied in the first form because I assume the objects are reference type.I have the save working as it calls a service layer to do the save and then refreshes the other form - but not the cancel.
I have tried a load of different codes to retreive the names & ids of HTML Elements on a webpage but nothing I have truid works has anyone got any ideas? Here is one of my tries:
Public Class frmgetelements Dim elementname As String Dim id As String
HTML i have a program that gets google links (and there html code)how could i get all elements inside of that and take each one out so i can format them in a specific way.
I made a windows form application using Visual Basic. One window has these controls: a web browser , a textbox (textbox1) and a button (button1). The webr bowser will have buttons and a text box which will display different numbers
I'm still learning the ropes in VB.NET and I'm currently up to a point in a current project where I would need to parse links on an html website once the information has been downloaded to the document completed section of my web browser.
I developed a WebBrowser which loads a certain web-site for me. The next task, I would like to see only a certain info on that web-site which acts like a table serving as special informational news for me. So, I don't want another things to be appear on my loaded web-site. I need to hide html elements, so that don't appear on my loaded web-site. So, then the form will be like smaller and it will be more convenient to use. Maybe, I need also to hide or remove some java scripts. Do you have any recommendations for it?
I want to get the links and images from an html code using the htmlDocument class available through webBrowser.So I retrieved and assigned the html code to the webBrowser trying each one of this 3
I have the following code in my application which gets the attributes "name" and "id" of all the html elements on a web page.
[Code]....
What I would like to do is place the returned results into a 2 column listview control with the name attribute in the first column and the id attribute in the second column. After searching the internet the only good example I could find is on the msdn pages but this only shows how to add a known set of items so I could not figure out how to convert this to work with variables.
There are some html buttons which dont have id . i want to access these html buttons which have the same type name and values . But i cant able to access then due to their same names and values [code]...
I am trying to pull a set of html elements from a webpages to copy all the links on the page and toss them into a richtextbox.The tags are <a href "I need everything inside the quotes"but for the life of me I cannot figure out of to work the line of code to accomplish this..
There seems to be no documentation on the codeplex page and for some reason intellisense doesn't show me available methods or anything at all for htmlagilitypack (for example when I type MyHtmlDocument.DocumentNode. - there is no intellisense to tell me what I can do next)
I need to know how to remove ALL < a > tags and their content from the body of the HTML document I cannot just use Node.InnerText on the Body because that still returns content from A tags.[code]...
I have tried a few things like converting HTML to XML and then using an XML navigator to get input elements but I get lost whenever I start this process.What I am trying to do is to navigate to a website which will be loaded using textbox1.text.Then download the html and parse out the input elements like . username, password, etc and place the element by type (id or name) into the richtextbox with the attribute beside the name.[code]Any clues or how to properly execute an HTML to XML conveter, reader, parser?
I got a list of objects. Each object has a property called Z (integer).There will come a point during run-time I will want to re-arrange such objects in my list depending on their Z property. The objects with lower Z go first in the list, and the ones with higher will go last.I have thought of a couple things, like making a new List, then loop through each object in the original list as many times as the amount of objects such list has (so if it has 10 objects, I would loop 100 times), and each iteration will check the Z values. When a cycle is done (for every 10 iterations), I will remove the object with the lowest Z number in cycle and add it to the new List. And so on until the 100 iterations are done.
I have a List of a custom class (barData) that I need to remove elements form based on a date.
The bardata class holds data of stock price information.[cod]e...
Is there a way to do it without looping through each bar as I may have 2000 plus bars for each stock and may have 2000+ plus stocks to look at. It can be done by looping but it is slow.
I would like a function generate all of the k-combinations of elements from a List of n elements. Note that I am looking for combinations, not permutations, and that we need a solution for varying k (i.e., hard-coding the loops is a no-no).
I am looking for a solution that is a) elegant, and b) can be coded in VB10/.Net 4.0.
This means a) solutions requiring LINQ are ok, b) those using the C# "yield" command are not.
The order of the combinations is not important (i.e., lexicographical, Gray-code, what-have-you) and elegance is favored over performance, if the two are in conflict.
(The OCaml and C# solutions here would be perfect, if they could be coded in VB10.)
I am creating a dynamic clone method to be used in my custom classes. I want the clone function to be completely generic, so I do not have to make any changes when I add new properties to the class. I am having an issue with regards to making a deep copy a property that is a List. sample code that will enable me to identify with reflection that a property of my class is a List, and then more importantly the code to loop through the the List elements and copy of each of them. I have been able to identify a property as a List by using the NameSpace of the property type, but I'm not a big fan of that method. Either way, I have yet been able to dynamically loop and deep copy the elements of the property that's a List using reflection.
Is there a succint way in vb.net to create an array or similar of each of the properties in a list?
E.g. If I have a list of 'a' and each 'a' has a property 'b', I want to create an array which contains all the 'b's, in the same index positions as the original list.
I have a user defined structure in a list that I am trying to change the value for in an individual element within the list of structures. Accessing the element is not a problem. However, the compiler complains
"Expression is a value and therefore cannot be the target of the assignment"when I try to update the value.For example:
Public Structure Person Dim first as String Dim last as String Dim age as Integer
I need to set up a list consisting of arrays of two elements. Simple, right?
Like: (code snippet):
Dim strDataPoint(1) As String '2-element array Dim lBiasCurve As New List(Of strDataPoint) 'list of 2-element arrays Dim lPwrCurve As New List(Of strDataPoint) 'another list of 2-element arrays
But this gives me an error msg on 2nd and 3rd line: type strDataPoint is not defined....