Click here to Skip to main content
16,021,687 members

Comments by MikeVaros (Top 9 by date)

MikeVaros 20-Aug-12 8:39am View    
I didn't notice that ddltext in this example I posted, but I've tried several combinations of those variables. I have the editor declared as

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit.HTMLEditor" tagprefix="cc1" %> And then later on as <cc1:Editor ID="Editor1" runat="server" Height="500px" /> as shown above.

The only way I can seem to get this to work is to sack the Jquery completely and try to append it to the end of the Html Editor's content on the SelectedIndexChanged event of the ComboBox. But this doesn't meet my requirement. I have been pulling my hair out for days trying to figure this out, and I have gotten nowhere. Any help you can offer would be greatly appreciated.
MikeVaros 6-Jul-12 13:36pm View    
I feel like an idiot now. But I suppose I'd prefer it was something simple as opposed to a logic error. I was using the horizontal line tag in each of the html pages I was trying to run through the program. And it doesn't look like HTMLWorker has any methodology for handling this tag. The reason my hard-coded HTML worked was because I didn't use that tag in there. I was just doing a short snippet in a string. I figured it out the second I tried to insert one of those "hr" tags into that string. Instantly got a Null Reference Exception, and it clicked.

Thank you for helping, and I'll keep that in mind about the <br> tags if I notice any formatting issues with the string builder.

Mike
MikeVaros 6-Jul-12 11:59am View    
It only seems to error out when that string "html" is created with a stringbuilder object. So the problem is there. The only problem is, that sb object renders the correct output to the textbox, so I know it isn't empty. And it doesn't truncate any text, so I know it isn't going beyond capacity.
MikeVaros 6-Jul-12 11:55am View    
I'll paste in my stack trace. It's pretty large to describe easily.

at iTextSharp.text.html.simpleparser.HTMLWorker.CreateLineSeparator(IDictionary`2 attrs)
at iTextSharp.text.html.simpleparser.HTMLTagProcessors.HTMLTagProcessor_HR.StartElement(HTMLWorker worker, String tag, IDictionary`2 attrs)
at iTextSharp.text.html.simpleparser.HTMLWorker.StartElement(String tag, IDictionary`2 attrs)
at iTextSharp.text.xml.simpleparser.SimpleXMLParser.ProcessTag(Boolean start)
at iTextSharp.text.xml.simpleparser.SimpleXMLParser.Go(TextReader reader)
at iTextSharp.text.xml.simpleparser.SimpleXMLParser.Parse(ISimpleXMLDocHandler doc, ISimpleXMLDocHandlerComment comment, TextReader r, Boolean html)
at iTextSharp.text.html.simpleparser.HTMLWorker.Parse(TextReader reader)
at iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader, StyleSheet style, IDictionary`2 tags, Dictionary`2 providers)
at iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader, StyleSheet style, Dictionary`2 providers)
at iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader, StyleSheet style)

Thank you for your help,

Mike
MikeVaros 6-Jul-12 11:43am View    
"Cannot convert from 'string' to 'System.IO.TextReader'" I'm almost positive I tried that myself yesterday, but I figured it may be worth a shot. Thank you for the response though. It seems to think that the "store" String is empty. If I manually enter the html as a string, it works perfectly, but this isn't dynamic enough to suit my needs. I'm banging my head off the wall trying to figure this out.

I'm just going out on a limb here, but if the size of the string exceeds Stringbuilder's default capacity, could it return a null exception?