I\'m having a issue trying to figure out this. I need to \"fix\" some links, here is an example:
To remove last "?" and everything after it:
string input = @"www.site.com/link/index.php?REMOVETHISHERE";
input = input.Remove(input.LastIndexOf('?'));
OR
string input = @"www.site.com/link/index.php?REMOVETHISHERE";
input = input.Substring(0, input.LastIndexOf('?'));
Now the output will be:
www.site.com/link/index.php