15,917,862 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 yogeshcgs (Top 6 by date)
yogeshcgs
15-Sep-10 2:42am
View
I want to create webbrowser control at runtime. for this i created one class to handle runtime created webbrowser. meantime i will be calling this class in threads, might be 10 threads at a time.
yogeshcgs
30-Aug-10 6:14am
View
we can develop toolbar for IE. so can we not create for firefox??
yogeshcgs
11-Aug-10 23:47pm
View
i tried this, but it does not work..............
yogeshcgs
11-Aug-10 14:11pm
View
it did not work error.......
yogeshcgs
11-Aug-10 11:34am
View
please help me out. its very urgent.........
yogeshcgs
11-Aug-10 11:33am
View
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Runtime.Serialization;
using System.Xml.Serialization;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
HtmlElement obj;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
XmlSerializer sw = new XmlSerializer(typeof(HtmlElement ));
FileStream fs = new FileStream("1.txt", FileMode.OpenOrCreate);
sw.Serialize(fs, obj);
fs.Close();
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
HtmlElementCollection col = webBrowser1.Document.GetElementsByTagName("a");
foreach (HtmlElement htmlel in col)
{
if (htmlel != null)
{
obj = htmlel;
return;
}
}
}
private void Form1_Load(object sender, EventArgs e)
{
webBrowser1.Navigate("www.digg.com");
}
}
}
please see the code.
i am getting error....
System.Windows.Forms.HtmlElement cannot be serialized because it does not have a parameterless constructor.
Show More