15,917,320 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 9665875 (Top 23 by date)
Member 9665875
22-May-17 15:33pm
View
Thank you for your fast response, can you help me out further please, i have this currently, where am i going wrong please?
HtmlElementCollection theElementCollection = default(HtmlElementCollection);
theElementCollection = webBrowser1.Document.GetElementsByTagName("div");
foreach (HtmlElement curElement in theElementCollection)
{
if (curElement.GetAttribute("className").ToString() == "ng-scope")
{
HtmlElementCollection childDivs = curElement.Children.GetElementsByName("strong");
foreach (HtmlElement childElement in childDivs)
{
MessageBox.Show(childElement.InnerText);
}
}
}
Member 9665875
22-May-17 15:05pm
View
Deleted
Thank you for your fast response, can you help me out further please, i have this currently, where am i going wrong please?
HtmlElementCollection theElementCollection = default(HtmlElementCollection);
theElementCollection = webBrowser1.Document.GetElementsByTagName("div");
foreach (HtmlElement curElement in theElementCollection)
{
if (curElement.GetAttribute("className").ToString() == "ng-scope")
{
HtmlElementCollection childDivs = curElement.Children.GetElementsByName("strong");
foreach (HtmlElement childElement in childDivs)
{
MessageBox.Show(childElement.InnerText);
}
}
}
Member 9665875
21-May-17 17:49pm
View
i have thank you, i just failed to include it
Member 9665875
19-Mar-14 17:19pm
View
this is what i would like though
Member 9665875
19-Mar-14 17:08pm
View
the textbox must only contain letters and not numbers in any part of the textbox
Member 9665875
19-Mar-14 16:58pm
View
my only problem with the top solution which i would like to use, is it checks the first character in the textbox and not the entire textbox how can i change this so the if loop condition applies for the whole textbox
Member 9665875
16-Dec-13 6:30am
View
so theres no easy way, to select any row and that row changes colour within a listview
Member 9665875
16-Dec-13 6:15am
View
what i am after is, the user to select a row in the listview and when that row is selected channge the colour of that row using a button :/
Member 9665875
12-Dec-13 16:56pm
View
that does it very nice cheers dudos
Member 9665875
11-Dec-13 16:25pm
View
Deleted
Whats the problem is im not sure how to access the specific columns in the list view. How can i access the columns so i can then write them to my XML nodes with the childnodes as the columns please. If i know how to access the columns i think this is more or less answered. :)
Member 9665875
11-Dec-13 16:22pm
View
my problem, is i'm unsure, how to fire my listview columns and put them under a specific child node within a node in my XML file. Maybe if you told me how to access the separate columns items then i may be able to do this on my own :)
Member 9665875
10-Dec-13 15:05pm
View
Ive updated my code to this but still no. Please look below for my attempted code.
XmlNode ForenameNode = doc.SelectSingleNode("Names/Name/Forename");
string ForenameVariable = ForenameNode.InnerText;
foreach (XmlNode xn in listBox1.Items)
{
listBox1.Items.Add(Forename);
}
Member 9665875
10-Dec-13 14:53pm
View
I mean the bog standard c# listbox "listBox1"
Member 9665875
10-Dec-13 14:48pm
View
no i would love to do it in a listbox if possible, i would love to load all the "First" child nodes into a listbox if possible above is the code i have so far can you please help me get to where i need :)
Member 9665875
9-Dec-13 13:40pm
View
your the master, with a plan :)
Member 9665875
9-Dec-13 11:52am
View
This sounds very good perhaps i should explain a bit more though. So what i am wanting is a piece of code that when checked against a textbox it searches for the nodes say for example "Users/User/Password" checks what is in the "Password" node for each "User" and goes down each node looking for what is been entered in the textbox. Each "User" has a block of ChildNodes "UsernameNode" & "PasswordNode" & "PermissionNode". The aim of my code is to check against all three textboxes and if all is equal open a form. Any more further suggestions
Member 9665875
8-Dec-13 11:22am
View
XmlNode Usernamenode = xdoc.SelectSingleNode("Users/User/Username");
string UsernamenodeVariable = Usernamenode.InnerText;
XmlNode Passwordnode = xdoc.SelectSingleNode("Users/User/Password");
string PasswordnodeVariable = Passwordnode.InnerText;
XmlNode Permissionnode = xdoc.SelectSingleNode("Users/User/Permission");
string PermissionnodeVariable = Permissionnode.InnerText;
Member 9665875
7-Dec-13 11:42am
View
so you say get rid of the if loop? i am confuse what you mean mate :(
Member 9665875
7-Dec-13 11:41am
View
so, i should get rid of the if loop and have the code you suggested in the Microsoft link?
Member 9665875
7-Dec-13 11:34am
View
in the if loop for else, would i put file.close() ???
Member 9665875
7-Dec-13 11:30am
View
im not this in the code, please see above for when i only get this error
Member 9665875
7-Dec-13 11:28am
View
if the file exists it doesn't show an error. Only when it creates file
Member 9665875
7-Dec-13 9:42am
View
the error says
The process cannot access the file 'D:\XMLs\UserLogins.xml' because it is being used by another process.
bfore the code above i have this
if (File.Exists(loginDetails))
{
//
}
else
{
File.Create(loginDetails);
}
Show More