Alternative to Panel Control

G

Guadala Harry

AFAIK, the Panel control renders as a <SPAN> in the rendered HTML.

Is there an alternative to Panel that renders NOTHING?

Here is what I'm doing:
I need to place a bunch of HTML in an ASCX - but cause only some of it to be
rendered based on runtime conditions. I currently have the behaviour I want,
but by using multiple Panel controls that encompass the sections of HTML
that are to be rendered. My code-behind logic makes sets the .visible
property of the Panel controls.

I just want to do the same thing - but not have the SPAN elementes show up
in the rendered page.

Thanks!
 
A

Axel Dahmen

I have the same trouble. Using the asp:panel control is particularly
pointless when you're trying to hide some table rows with it.

Have you tried to create your own Panel control by deriving from the
asp:panel control and overwriting its Render methods?

HTH,
Axel Dahmen
 
A

Axel Dahmen

....I should add that it's as simple as just deriving from asp:panel and add
two empty render functions: RenderBeginTag() and RenderEndTag(). Then no
<span></span> will be created.
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top