473,395 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

web in windows ?

hi i was wondering if there was a HTML object in .net ?
I need to access a particular web page in my windows application and to be
able to parse it. How is this done ? Is there an Inet control or something
like in vb6 ?
Nov 20 '05 #1
9 1027
Cor
Hi Mike,

You need for that to open your toolbox and add in that the microsoft
webbrowser from the com objects.

Than you can drag it on your form.

I hope this helps,

Cor
hi i was wondering if there was a HTML object in .net ?
I need to access a particular web page in my windows application and to be
able to parse it. How is this done ? Is there an Inet control or something
like in vb6 ?

Nov 20 '05 #2
Hello Mike

There's a com component called 'Microsoft Web Browser'
i've never used it so i don't how it works.

Also you can use WebClient class to download the .HTML
file that you wish to parse.

Kind Regards
Jorge Cavalheiro
-----Original Message-----
hi i was wondering if there was a HTML object in .net ?
I need to access a particular web page in my windows application and to beable to parse it. How is this done ? Is there an Inet control or somethinglike in vb6 ?
.

Nov 20 '05 #3
what do you want to do exactly?

if for example you want to parse the html code to find one particular part
of it, you can use regular expressions
System.Text.RegularExpressions

dominique

"Mike Smith" <te**@test.com> wrote in message
news:OE**************@tk2msftngp13.phx.gbl...
hi i was wondering if there was a HTML object in .net ?
I need to access a particular web page in my windows application and to be
able to parse it. How is this done ? Is there an Inet control or something
like in vb6 ?

Nov 20 '05 #4
yeah realised i got to use back the old controls back in .net for it..
thought there might be new ones.

I basically want to parse a particular page content in an application. This
is my dilema now.

The internet control can return me the sourcecode of a page from the OpenUrl
method, the trouble is the page has a script to be executed onLoad and i
need to read the refreshed version of the source.

The webbrowser control can link to the url i want and it runs the script
onLoad and shows me the correct page to parse.. But i cant find any means to
retrieve the source of this control..

So what do i do ????????????????????
"Dominique Vandensteen" <domi.vds_insert@tralala_tenforce.com> wrote in
message news:uy**************@TK2MSFTNGP10.phx.gbl...
what do you want to do exactly?

if for example you want to parse the html code to find one particular part
of it, you can use regular expressions
System.Text.RegularExpressions

dominique

"Mike Smith" <te**@test.com> wrote in message
news:OE**************@tk2msftngp13.phx.gbl...
hi i was wondering if there was a HTML object in .net ?
I need to access a particular web page in my windows application and to be able to parse it. How is this done ? Is there an Inet control or something like in vb6 ?


Nov 20 '05 #5
can you maybe send an example of what you want to do

but maybe this can help...
add a extra "non-html" tag before and after the part of html you need (if
this is possible)
browsers will simply ignore these not-known tags

so

....htmlcode and stuff...
<pompom>
....code to find...
</pompom>
....other htmlcode and stuff...

dim re as new Regex(".+<pompom>(.+)</pompom>.+")
dim m as Match = re.Match(theHtmlSourceAsString)

if(m.Success) then
dim myCode as String = m.Groups(1).Value
....
end if

if you have the correct structure you will have a match
this match will have one group containing the code you want to find...
(if i didn't made a regex error ;-))
dominique
"Mike Smith" <te**@test.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
yeah realised i got to use back the old controls back in .net for it..
thought there might be new ones.

I basically want to parse a particular page content in an application. This is my dilema now.

The internet control can return me the sourcecode of a page from the OpenUrl method, the trouble is the page has a script to be executed onLoad and i
need to read the refreshed version of the source.

The webbrowser control can link to the url i want and it runs the script
onLoad and shows me the correct page to parse.. But i cant find any means to retrieve the source of this control..

So what do i do ????????????????????
"Dominique Vandensteen" <domi.vds_insert@tralala_tenforce.com> wrote in
message news:uy**************@TK2MSFTNGP10.phx.gbl...
what do you want to do exactly?

if for example you want to parse the html code to find one particular part
of it, you can use regular expressions
System.Text.RegularExpressions

dominique

"Mike Smith" <te**@test.com> wrote in message
news:OE**************@tk2msftngp13.phx.gbl...
hi i was wondering if there was a HTML object in .net ?
I need to access a particular web page in my windows application and
to be able to parse it. How is this done ? Is there an Inet control or something like in vb6 ?



Nov 20 '05 #6
Cor
Hi Mike,

If you want to get information from a webpage (although you can never get a
page from the internet only one document and sometimes that is the page).
Than you use mshtml to get the information from the document.

Instead of the webbrowser you can also have a look for all the httprequest
classes but that are so much that I cannot tell you which you have to use.

If you want to have the whole page of a document you can get that by using
Html.innertext block. (The only thing you do not get it the leading HTML
tag and the closing HTML tag) Or any other innertext block.

When you use mshtml you have to set a reference for it but do not set an
import, because this class freezes your IDE, you need to set an prefix
reference every time you use it.

I hope this helps,

Cor
Nov 20 '05 #7
thanks for all the input..

yeah i ended up using the httprequest classes... i had to workaround it..
cause i had to send data back to the page, it works with the GET method so i
could just parse the result.

I wanted to use it with a post method so i had to call the submit routine
from a script that executes when the page loads. The trouble with this way
is , the source code returned is always of the original page before the
submit process excutes. So i cant parse the info i needed.

Ofcourse i'm still wondering how do u excute a web page and get its source
out ..... The webserver control is the only one that seems to execute the
page scripts properly. Yeah i can right click the control and view source,
but how does one access this thru code ?
"Cor" <no*@non.com> wrote in message
news:e7****************@TK2MSFTNGP10.phx.gbl...
Hi Mike,

If you want to get information from a webpage (although you can never get a page from the internet only one document and sometimes that is the page).
Than you use mshtml to get the information from the document.

Instead of the webbrowser you can also have a look for all the httprequest
classes but that are so much that I cannot tell you which you have to use.

If you want to have the whole page of a document you can get that by using
Html.innertext block. (The only thing you do not get it the leading HTML
tag and the closing HTML tag) Or any other innertext block.

When you use mshtml you have to set a reference for it but do not set an
import, because this class freezes your IDE, you need to set an prefix
reference every time you use it.

I hope this helps,

Cor

Nov 20 '05 #8
Cor
Hi Mike,

I am not sure what you mean with the webserver control if that is the
webbrowser you have to look at the Documentcomplete event

I hope this helps,

Cor
thanks for all the input..

yeah i ended up using the httprequest classes... i had to workaround it..
cause i had to send data back to the page, it works with the GET method so i could just parse the result.

I wanted to use it with a post method so i had to call the submit routine
from a script that executes when the page loads. The trouble with this way
is , the source code returned is always of the original page before the
submit process excutes. So i cant parse the info i needed.

Ofcourse i'm still wondering how do u excute a web page and get its source
out ..... The webserver control is the only one that seems to execute the
page scripts properly. Yeah i can right click the control and view source,
but how does one access this thru code ?

Nov 20 '05 #9
Here's the URL for the documentation for the WebBrowser control:

http://msdn.microsoft.com/library/de...RefList_VB.asp

It looks to me like you can wait for the DocumentComplete event, and
then get use the WebBrowser's .Document.documentElement.outerHTML
property.
"Mike Smith" <te**@test.com> wrote in message news:<uL*************@tk2msftngp13.phx.gbl>...
thanks for all the input..

yeah i ended up using the httprequest classes... i had to workaround it..
cause i had to send data back to the page, it works with the GET method so i
could just parse the result.

I wanted to use it with a post method so i had to call the submit routine
from a script that executes when the page loads. The trouble with this way
is , the source code returned is always of the original page before the
submit process excutes. So i cant parse the info i needed.

Ofcourse i'm still wondering how do u excute a web page and get its source
out ..... The webserver control is the only one that seems to execute the
page scripts properly. Yeah i can right click the control and view source,
but how does one access this thru code ?
"Cor" <no*@non.com> wrote in message
news:e7****************@TK2MSFTNGP10.phx.gbl...
Hi Mike,

If you want to get information from a webpage (although you can never get

a
page from the internet only one document and sometimes that is the page).
Than you use mshtml to get the information from the document.

Instead of the webbrowser you can also have a look for all the httprequest
classes but that are so much that I cannot tell you which you have to use.

If you want to have the whole page of a document you can get that by using
Html.innertext block. (The only thing you do not get it the leading HTML
tag and the closing HTML tag) Or any other innertext block.

When you use mshtml you have to set a reference for it but do not set an
import, because this class freezes your IDE, you need to set an prefix
reference every time you use it.

I hope this helps,

Cor

Nov 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
7
by: lvpaul | last post by:
Hallo ! I am using IIS-Windows-Authentication in my intranet (web.config <authentication mode="Windows" /> <identity impersonate="true" /> How can I get the users (client) IP-Address ? I...
7
by: Tyler Foreman | last post by:
Hello, I have a strange problem that occurs every so often in my application. It usually takes place when I hide one form and activate another. What happens is I get the following exception:...
1
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. I'm having trouble getting the code that I've written to work, can anyone shed some light as to where I'm...
0
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. The program I'm trying to develop needs to be able to do the following: - Select remote server -...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
2
by: sambo251 | last post by:
After running a few updates I get this very annoying "Windows Installer" error #1706 that will ne go away! It keeps saying that it cannot find the file "instantsharedevices.msi", that it is on...
1
by: mfunkmann | last post by:
Hi, I recently got an error and I don't know how to fix it: Error 1 'System.Data.DataColumn' does not contain a definition for 'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO I...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: List of autostart locations Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list all the autostart locations for windows? Ans: Here is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.