1

I'm developing a WPF app in C# that opens a link when a button is pressed that uses query strings to communicate some information. Right now, I use Process.start(myURL). When using Chrome as the default browser, the query string information gets stripped out. The same code works for IE/Chrome/Firefox on Windows 8 and for IE/Edge in Windows 10.

You can replicate the issue by running Process.Start("https://www.google.com/#q=cats");, you won't even get one adorable cat picture.

EDIT: Thanks to @mjw, I've discovered that the problem is with my company's URL, which is something of the format https://mycompany.com/#/login?token=xxx. So the new question, how can I use hash signs in my URLs? I've tried %23 in place of # with no success.

  • 1
    So I take it you are consuming the hashed portion of the qs and aren't seeing anything on that end where it's processed? Have a look at this thread http://stackoverflow.com/questions/317760/how-to-get-url-hash-from-server-side as I think you may be looking for something you aren't actually sending across. – mjw Aug 24 '15 at 19:44
  • 1
    mjw has the right solution. You are mixing up hashes, which are kind of like bookmarks on a given page, with query string parameters, which are sent to a server as part of the URL. I have no idea how IE actually loads a cat page given that URL. Maybe it is the "search from URL" feature built into modern browsers that causes the hashes to work in some cases. – Christoph Aug 24 '15 at 19:56
  • Well...`#q=cats` wasn't a very good representative URL (Since it doesn't use parameters) but it did give me some good information: The real URL that I'm trying to use is in the format `https://mycompany.com/#/login?token=xxx`. While MJW's answer does work, mine doesn't. Editing my question now. – progressiveCavemen Aug 24 '15 at 20:24

2 Answers2

2

This is seemingly obvious, but have you tried:

Process.Start("https://www.google.com/search?q=cats");
mjw
  • 1,196
  • 1
  • 12
  • 19
1

This is a known bug in Chrome, set to be fixed in the next alpha build.