tags:

views:

50

answers:

2

Can i use like webclient or webrequest (I dont know) to do the following:

click a button, once its click it send a string lets say "Hello" to a website's textbox,

for example: button1 click, write "Hello" on textbox1 on website http://Test.com

A: 

There two general ways to deal with websites - either you are speaking straight HTTP in your C# program (this is WebRequest) or you use COM/Interop to control a browser.
If you are looking at HTML, then you need to use Interop to remote control a browser. Other alternatives to look at are Selenium.

weismat
A: 

WebClient is a class in System.Net namespace

you can download the content throught webclient by writing a method like

  public static string downloadcontent(string urlofpage)
        {
            WebClient client = new WebClient();

            string content = client.DownloadString(urlofpage);

            return content;
        }

this method return you a page who you want to download.

if you need something else then tell me by comment

steven spielberg