Reputation: 31
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
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+"");
Upvotes: 1
Views: 50
Reputation: 11
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?
Upvotes: 0
Reputation: 3256
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.
Upvotes: 1