shlomi gadol

shlomi gadol

  • NA
  • 36
  • 56.9k

WebClient has problem reading web page

Jul 28 2015 12:10 PM
Hi,
 
I have problem reading web page string, This is my code. I got only "" in the result string. If you can help me it would be great.
 
you can see that the url provide something in webrowser but with webclient it doesn't return anything. if you can try it by yourself and reply with resolution.
 
thanks a lot
shlomi
 
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string url;
url = "http://www.finviz.com/screener.ashx?v=110&s=ta_topgainers&o=-price"; // This is not working
WebClient client = new WebClient();
string reply = client.DownloadString(url);
}
}
}
 
 
 

Answers (4)