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 white-spaces from a string; But I don’t know, how can I use theme in ASP.NET MVC 3 for remove all white-spaces from output-string. For example, when the “OnResultExecuted” method invoked, and the result is ready to send to the end-user’s browser, I want to obtain result – as a String, or a Stream object; not difference between them -, and do my job on it.
Thanks to all. 🙂
I found my answer and create a final solution like this:
First create a base-class to force views to inherit from that, like below, and override some methods:
Then we should make some changes in
web.configfile that located inViewsfolder –see here for more details.