Monu Zira

Monu Zira

  • NA
  • 77
  • 4.7k

Read a dynamically content from page in c#

Oct 19 2015 3:22 PM
Sir how to read dynamically content from page.Suppose i have a site and some tag like
<div class="read_data" data-id="Uwerxd12" ></div>
 
Now i want to read data-id;
 
Please check my code:
 
WebClient x = new WebClient();

url = x.DownloadString("https://www.xyz.com/id='" + search.Text + "'");

Int32 data = url.IndexOf("data-id");


richTextBox1.Text += url.Substring(data , 170); 
 

Answers (1)