Problem in writing to flie

Mar 3 2011 2:00 AM
Hi,
im developing an application to filter the websites for my personal use.
im doing this by editing the host file using c sharp. 
User can enter the website URL in the give text field, once a user enters a value(web address) for the text field it appends that particular web address in the host file with the local host IP. 
The issue is it saves the value with an additional text which is namespace path as mentioned below

127.0.0.1    System.Windows.Forms.TextBox, Text: yahoo.com

What i need to know is how can i remove 'System.Windows.Forms.TextBox, Text:' this part???
why it happens??

Thanks in advance.  

Answers (5)