1
Reply

Read a dynamically content from page in c#

Monu Zira

Monu Zira

Oct 19 2015 3:22 PM
429
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)