User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 423,489 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,718 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 307 | Replies: 2
Reply
Join Date: Mar 2007
Posts: 50
Reputation: FaridMasood is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
FaridMasood's Avatar
FaridMasood FaridMasood is offline Offline
Junior Poster in Training

how to Read a page in aspx page

  #1  
Jun 5th, 2008
I am a programmer with not more than 2 months experience and facing a very difficult chellange.
I want to read an online page in my aspx page to get the data on that page.
is it possible to read a page not developed by me.

Any one can help me,
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2007
Posts: 287
Reputation: ericstenson is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 28
Colleague
ericstenson's Avatar
ericstenson ericstenson is offline Offline
Posting Whiz in Training

Re: how to Read a page in aspx page

  #2  
Jun 5th, 2008
There are a few methods by which this can be down. You can control a web broswer control if you are using a windows based application. If it's a web app, it's a little more difficult, but you can create a http request and read the stream back.

The examples of how to do this are quite long. Use google a little to get it going, then when you get stuck, I'll help you out.
--
"Dummy."
Reply With Quote  
Join Date: Mar 2007
Posts: 50
Reputation: FaridMasood is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
FaridMasood's Avatar
FaridMasood FaridMasood is offline Offline
Junior Poster in Training

Re: how to Read a page in aspx page

  #3  
Jun 5th, 2008
Hi, Ericstenson
Thank you for you reply,
I got the logic and performed http request and read the data in stream, and showed that on a label.
NOw is the real challenge i want to find some data in that stream and store that in a data set .

Here is the code I used to read the page.

Dim strUrl As String = ""
Dim strPostData As String = ""
Dim strResult As String = ""
Dim wbrq As HttpWebRequest
Dim wbrs As HttpWebResponse
Dim sw As StreamWriter
Dim sr As StreamReader

'Create web request
wbrq = WebRequest.Create(strUrl)
wbrq.Method = "GET"

'Read returned data
wbrs = wbrq.GetResponse
sr = New StreamReader(wbrs.GetResponseStream)
strResult = sr.ReadToEnd.Trim
sr.Close()
lblResult.Text = strResult

I read the page
"http://www.paddypower.com/bet?action=show_event_by_markets&chosen_ev_id=1118182&category=SOCCER&ev_class_id=&disp_cat_id="

you can visit this page i will help you to understand the problem.
now i want to get data from this stream in a dataset such i want to get the "Win-draw-Win" "Draw No Bet' and similar all bet data in dataset how to do so.
I hope you will help me.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 3:56 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC