Click here to Skip to main content
16,017,235 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: need urgent help how to synchronize web & windows database. Please help Pin
Baran M9-Jun-09 22:54
Baran M9-Jun-09 22:54 
AnswerRe: need urgent help how to synchronize web & windows database. Please help Pin
samMaster10-Jun-09 1:03
samMaster10-Jun-09 1:03 
Questionnested gridview [modified] Pin
vikas shukla9-Jun-09 22:24
vikas shukla9-Jun-09 22:24 
AnswerRe: nested gridview Pin
N a v a n e e t h9-Jun-09 22:33
N a v a n e e t h9-Jun-09 22:33 
Questionhow to retrieve data from a website. Pin
jainiraj9-Jun-09 21:54
jainiraj9-Jun-09 21:54 
AnswerRe: how to retrieve data from a website. Pin
Christian Graus9-Jun-09 22:13
protectorChristian Graus9-Jun-09 22:13 
AnswerRe: how to retrieve data from a website. Pin
Abhijit Jana9-Jun-09 22:30
professionalAbhijit Jana9-Jun-09 22:30 
AnswerRe: how to retrieve data from a website. Pin
David Mujica11-Jun-09 4:44
David Mujica11-Jun-09 4:44 
Check this article out:
http://www.west-wind.com/presentations/dotnetWebRequest/dotnetWebRequest.htm[^]

I created a test ASP.net web page with a button on it and used the following code to retrieve to the web page you wanted. what you would have to do is parse through the string, "lcHtml", which contains the table data.

Good luck.

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

       Dim myURL As String = "http://www.moneycontrol.com/stocks/marketstats/mostactive.php?optex=NSE&index=31&opttopic=mostactive"

       ' *** Establish the request

       Dim loHttp As HttpWebRequest


       loHttp = WebRequest.Create(myURL)

       ' *** Set properties

       loHttp.Timeout = 10000     ' 10 secs
       loHttp.UserAgent = "Code Sample Web Client"

       ' *** Retrieve request info headers

       Dim loWebResponse As HttpWebResponse
       loWebResponse = loHttp.GetResponse()

       Dim enc As Encoding

       enc = Encoding.GetEncoding(1252)  ' Windows default Code Page

       Dim loResponseStream As New StreamReader(loWebResponse.GetResponseStream(), enc)

       Dim lcHtml As String

       lcHtml = loResponseStream.ReadToEnd()

       loWebResponse.Close()

       loResponseStream.Close()

       Response.Write(lcHtml)

       'System.Diagnostics.Debug.WriteLine(lcHtml)


   End Sub

GeneralRe: how to retrieve data from a website. Pin
AftabR7-Jul-09 21:48
AftabR7-Jul-09 21:48 
GeneralRe: how to retrieve data from a website. Pin
David Mujica8-Jul-09 3:25
David Mujica8-Jul-09 3:25 
GeneralRe: how to retrieve data from a website. Pin
AftabR8-Jul-09 4:49
AftabR8-Jul-09 4:49 
GeneralRe: how to retrieve data from a website. Pin
David Mujica8-Jul-09 6:25
David Mujica8-Jul-09 6:25 
GeneralRe: how to retrieve data from a website. Pin
AftabR8-Jul-09 7:43
AftabR8-Jul-09 7:43 
QuestionUnble to write files to a folder in ASP.NET application. Pin
NN219-Jun-09 21:42
NN219-Jun-09 21:42 
Question[Message Deleted] Pin
rsrajiv9-Jun-09 21:35
rsrajiv9-Jun-09 21:35 
AnswerRe: Help in .net Guestbook Pin
Christian Graus9-Jun-09 21:38
protectorChristian Graus9-Jun-09 21:38 
GeneralRe: Help in .net Guestbook Pin
rsrajiv10-Jun-09 20:08
rsrajiv10-Jun-09 20:08 
Questionvalue is not getting in dropdown after a button click Pin
anbusenthil9-Jun-09 21:15
anbusenthil9-Jun-09 21:15 
AnswerRe: value is not getting in dropdown after a button click Pin
jloubani9-Jun-09 21:18
jloubani9-Jun-09 21:18 
GeneralRe: value is not getting in dropdown after a button click Pin
Christian Graus9-Jun-09 21:21
protectorChristian Graus9-Jun-09 21:21 
GeneralRe: value is not getting in dropdown after a button click Pin
jloubani9-Jun-09 21:26
jloubani9-Jun-09 21:26 
GeneralRe: value is not getting in dropdown after a button click Pin
Christian Graus9-Jun-09 21:36
protectorChristian Graus9-Jun-09 21:36 
AnswerRe: value is not getting in dropdown after a button click Pin
Christian Graus9-Jun-09 21:20
protectorChristian Graus9-Jun-09 21:20 
AnswerRe: value is not getting in dropdown after a button click Pin
Abhijit Jana9-Jun-09 21:23
professionalAbhijit Jana9-Jun-09 21:23 
QuestionStatic Varible Sharing Problem Pin
Shivan Nandan9-Jun-09 21:03
Shivan Nandan9-Jun-09 21:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.