I have the Render method on my base page overridden to remove whitespaces and return lines, etc.
Everything works fine with the regular ajax manager but the new one seems to have a problem with me doing this. (Sys.WebForms.PageRequestManagerParseErrorException: The message recieved from the server could not be parsed. etc...) I assume it is due to how MS formats the return string to the browser. Am I out of luck on getting this to work?
Thanks... Jason
protected override void Render(HtmlTextWriter writer) |
{ |
StringWriter stringWriter = new StringWriter(); |
HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter); |
base.Render(htmlWriter); |
string html = stringWriter.ToString(); |
html = html.Replace("\t", ""); // tabs |
html = html.Replace(" ", " "); // double spaces |
html = html.Replace(" />", "/>"); // space before end of tags |
html = html.Replace(">\r", ">"); // space before end of tags |
html = html.Replace(">\n", ">"); // space before end of tags |
writer.Write(html); |
} |
Everything works fine with the regular ajax manager but the new one seems to have a problem with me doing this. (Sys.WebForms.PageRequestManagerParseErrorException: The message recieved from the server could not be parsed. etc...) I assume it is due to how MS formats the return string to the browser. Am I out of luck on getting this to work?
Thanks... Jason