FormView inheritance question

J

Jonathan Carter

I've recently attempted to inherit the FormView control, simply to
remove the ungodly table element it renders around your template markup.
I'm not sure when you'd ever have a situation where designing a form to
be inserted inside an arbitrary table with one row and one column would
ever be desired let alone semantically correct. I was hoping that
Microsoft had followed the usual design of a custom control and
implemented the container table element rendering in the RenderBeginTag
method, but that didn't work. Then I thought maybe they're rendering the
table element inside the Render method and then rendering the children
inside it, but that wasn't the case either. It appears that every piece
of HTML generated from the FormView control is rendered within the
RenderContents method, including all child controls and the container
element as well (which seems kind of ridiculous to me). I'm not sure
what I'd have to do exactly inside the method once I overrode it once I
rendered my custom container markup, and I'm hoping someone has done
this before. If you've created your own FormView control, please let me
know any tips that would help in accomplishing what I'd like to do.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top