how can i write a program with c#.net to brows my web site automatically?

Use the webbrowser control in the toolbox. In the form load event call the Navigate(String) method of ther wbbrowser control, where string is your URL.

Are you trying to
1. open an installed browser with your URL? or
2. create a C# application with a browser embedded that would open the URL when loaded?

If you are trying point 1, the following code would help

System.Diagnostics.Process.Start("Your Web URL here");

System.Diagnostics.Process.Start("Your Web URL here");

And for point 2 refer the above answer.

thanks alote,
if i want to brows my web site for a special time for example i want to brows my website for 5 minuts after that i want to close my web site and then i want to brows another site with special time,how can i use timer?

there are many resources that explain timers in .net. What you'll probably need is an array with the sites you want to visit, and a counter initialized to 0, and a variable to hold the current url. In the timer tick event load the url, increment the counter, check if it's too high, if not change the url to the next in the array, else stop the timer or reset the counter

Are you including a browser control in your application? Kindly clarify.

how i can write a program with c#.net to brows my web site automatically with searching in google or another engine

There's a lot of code that can be done to do this. I speak first hand as I have been trying to find ways to monitor sites this way. You can use the WebBrowser, HttpRequest, WebClient (for example), there's also external libraries to help.

For instance cURl (http://curl.haxx.se/libcurl/dotnet/). I have been learning this library lately ... if you understand POST and GET (or cURl) it can be easier.

Either way what you are asking can be a lot of code. I have some code I have written that might serve your pupose but I can't guarantee it to work flawlessly (WebBrowser I have learned can be a pain in the butt item, and my knowledge with the cURl library is stil la work in progress ... of course with threading)

please help me i am a beginner,i want a code to search my keyword in one or some search engine automatically and then find my web site after that brows my website
it is very important for me i can not find any good instruction

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.