ASP.NET MVC returning ContentResult using Ajax form - how to preserve whitespace?
- by Ben
In my application users can enter commands that are executed on the server. The results are added to a session object. I then stuff the session object into ViewData and add it to a textarea.
When done with a standard HTML form whitespace is preserved.
However, when I swap this out for an ajax form (Ajax.BeginForm) and return the result as…