3
Answers

How to block a Website using C#

chaithanya

chaithanya

15y
14.1k
1
Hai
 I am developing an C# application(not asp.net) in which I have to get the urls typed by the user in the browser and I have to compare the urls with a set of urls and decide whether to allow or to deny the user to navigate to the website.
I have tried with appending to C:\windows\system32\drivers\etc\hosts file but its not working.So Is there any way I can do this?How to block the sites by getting the urls.Can someone suggest me how to approach to the solution with some sites or code that can help me.

Thank You
Chaithu 
Answers (3)
0
jrosa

jrosa

NA 7 0 20y
I found my own solution... I found that I could not have a DateTimePicker control bound to the dataset. When the DateTimePicker control was bound to the dataaset, the data would not display in any of the controls on the form. When I "un-bound" the DateTimePicker control, then the data woudl display properly. I bound an edit box to the date column and then updated the DateTimePicker control when the value of the edit box changed.