Last post Jul 30, 2008 09:07 AM by gilkesm
Jul 30, 2008 06:00 AM|gilkesm|LINK
I have written a control that provides a wrapper around a flash control object. In my overridden Render, I am writing out OBJECT and PARAM elements. In the values of one of the param elements I am required to dump a list of image URLs. The problem is HtmlTextWriter
is obviously HtmlEncoding the string which causes any URLs that have an '&' to be output as '&'. I've tried using HtmlUtility.UrlEncode around the string but it didn't work. Is there anyway I can tell HtmlTextWriter not to HtmlEncode at this point?
Jul 30, 2008 09:07 AM|gilkesm|LINK
I've solved my problem. The method of HtmlTextWriter, AddAttribute provides an override that takes an extra boolean fEncode which I set to false.
HtmlTextWriter.AddAttribute(string name, string value, bool fEncode)