1

I want to open no. of urls and I want to open 1st url in new window and after that others in same window but in new tabs. I am using c# and its a window application I use a code provided by Firefox but it is not opening new tab. It opens new window. here is my code:

private void btnSearch_Click(object sender, EventArgs e) { Process.Start("http://google.co.in","2048"); Process.Start("http://google.co.in","2048"); } 

thanks in advance.

1 Answer 1

1

The problem starts when you don't have you're browser open. Else it would work perfect without the Thread.Sleep.

Maybe you can try it like this

The "_blank" Opens a new blank page in the same window "So a new tab"

using System.Threading;

 private void button1_Click(object sender, EventArgs e) { Process.Start("http://www.google.com", "_blank"); Thread.Sleep(2000); Process.Start("http://www.google.com", "_blank"); } 
Sign up to request clarification or add additional context in comments.

2 Comments

i wanna ask you 1 more thing that how to setup parameter in a URL and shoot it up one by one. if u have any sample code please share it. Thanks alot for help.
Better make a new question for that. Don't understand what you are asking , Sorry. Maybe if I got some more info or explanation.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.