Nikunj Kacha

Nikunj Kacha

  • NA
  • 21
  • 7.9k

Site unblock

Jan 19 2013 10:15 PM
hello

how to unblock website using c#

i have block code 

String path = @"C:\Windows\System32\drivers\etc\hosts";
StreamWriter sw = new StreamWriter(path, true);
String sitetoblock = "\n 127.0.0.1 " + textBox1.Text;
sw.Write(sitetoblock);
sw.Close();
lblStat.Text = textBox1.Text + " site Blocked";

Answers (2)