datalist

P

Petr SIMUNEK

Is there a way to render something before the DATALIST
encapsulation table gets rendered ? So that I could have Label
before actual table that is rendered by DATALIST...

<h1>Some Label</h1>
<TABLE ID='DataList' width='100%'>
*** inside datalist objects rendered ***
</TABLE>

Thanx to all...
 
P

Petr SIMUNEK

Not exactly that...

Datalist by design encapsulates all its contents into a table when it
renders.
It's quite easy to manipulate inside formating and layout. I'm trying to add
something
before the actual leading <TABLE> tag gets writen, from inside the DataList
control events.
 
P

Petr SIMUNEK

My DATALIST is placed straight on the page. (not placed in a PLACEHOLDER or
something)
and I would like to render LABEL or anything outside of the encapsulating
DATALIST table
from within the datalist control, and its procedures,events...
(itemdatabound, prerender... ?)

no error since I dont really know how to aproach it..
Thanx for your time Curt
 
W

wizard04

You can put a label on the page, along with an ID, you should be able
to reference it from anywhere, whether it's inside or outside of the
datalist. For example:
<asp:Label ID="theLabel" runat="server" Text="This is the label"
Visible="false"/>
<asp:DataList ID="theDataList" runat="server" ... />

If you are trying to create a label at runtime (though I don't know why
you would; you could just make it not visible until you need it), put a
placeholder where you want the label, and add the label to the
placeholder at runtime. For example:
<asp:placeHolder ID="thePlaceHolder" runat="server"/>
<asp:DataList ID="theDataList" runat="server" ... />

Or am I misunderstanding?
 

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,772
Messages
2,569,593
Members
45,111
Latest member
VetaMcRae
Top