Hello,
I’ve been trying to render a canvas element on the page using Dotvvm code-only controls.
I have set the RenderBeginTag and RenderEndTag like this:
But when the html is created, I get only the <canvas …> tag and no the closing tag. Am i missing something? I’m also using AddAttributesToRender and OnPreRender
The code looks correct.
Can you try to put a breakpoint on the writer.RenderEndTag() to see whether it is called?
Or can you provide the full code of the control?
I just tried the GraphControl and it outputs <canvas></canvas>, as expected. Are you sure there is no end tag? One possibilite reason why it might seem missing is that the in dothtml is unclosed, so the dothtml parser placed everything into the control Children. I’d suggest using [ControlMarkupOptions(AllowContent = false)] to avoid this issue (if the control isn’t expected to have child nodes)