c# open url in chrome with hash (#) c# open url in chrome with hash (#) google-chrome google-chrome

c# open url in chrome with hash (#)


The command to open a URL in the default browser is start myURL, not just myURL.

You'll need to execute the command:

start "127.0.0.1/test.html#foobar"

Note that the quotes need to be in the resulting string, not in C#; the C# code for that would be:

string command = @"start" + @"""127.0.0.1/test.html#foobar""";


My default browser is chrome and this command works perfectly correctly:

System.Diagnostics.Process.Start(@"http://www.bitterminion.com/excel-launchpad#gopro");

The "#gopro" remains intact.