How can I remove all white-spaces from ASP.NET MVC 3 output?
UPDATE: I know how can I use string.Replace method or Regular Expressions to remove w
You could use the String.Replace method:
string input = "This is text with ";
string result = input.Replace(" ", "");
or use a Regex if you want to remove also tabs and new lines:
string input = "This is text with far too much \t " + Environment.NewLine +
"whitespace.";
string result = Regex.Replace(input, "\\s+", "");