1

Hello guys i am working on a Database an i am getting stuck i have a code to go to a site, log me in , and then open a new tab that would open a transaction page but the link i have has a space and when chrome gets it it searches only the first part.

Here is the code. System.Diagnostics.Process.Start("chrome.exe", " http://database.spincap.com/transaction/search/#entity/SCAP-3 LLC/review_capital/1323");

That is the one i am testing and when i reun that i get the following results

enter image description here

Can someone help me please

after that i am turning the code into

        // System.Diagnostics.Process.Start("chrome.exe", " http://database.spincap.com/transaction/search/#entity/" + PendingTran_Entityname + "/review_capital/" + PendingTran_ID+"");
CodeNotFound
  • 22,153
  • 10
  • 68
  • 69
Luis
  • 31
  • 4

2 Answers2

1

You have to put the parameter between double quotation marks:

Process.Start("chrome.exe", "\"http://database.spincap.com/transaction/search/#entity/SCAP-3 LLC/review_capital/1323\"");

Without the double quotation marks the space character is a delimiter for command line arguments.

Gabor
  • 3,021
  • 1
  • 11
  • 20
0

There are different approaches to encode URL

For example:

HttpUtility.UrlEncode("YourUrlGoesHere")

See more informatoin on this topic and use method that suits you the most: How do you UrlEncode without using System.Web?

Community
  • 1
  • 1
minXak
  • 11
  • 1