Hi,
Try this:
SearchLink = new Thread(new ThreadStart(() =>getData("http://" + TextBox1.Text.Trim())));
SearchLink.Start();
SearchLink.Join();
foreach (string value in myatt)
{
Label1.Text += value;
}
private void getData(string Url)
{
HyperLink1.Text = string.Empty;
HtmlWeb web = new HtmlWeb();
HtmlDocument myNode = web.Load(Url);
foreach (HtmlNode link in myNode.DocumentNode.SelectNodes("//a[@href]"))
{
HtmlAttribute att = link.Attributes["href"];
myatt.Add(att.Value);
}
}
Hope this helps.