1
Answer

Read a dynamically content from page in c#

Monu Zira

Monu Zira

9y
448
1
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)