Repeater in Server Control

J

Joe C

Does anyone know how I can use a repeater in a server control? This means I
do not want to have an ascx file. I am particulairly stuck with setting the
ItemTemplate property of the Repeater in the code behind.

thanks,

Joe C
 
W

Walter Wang [MSFT]

Hi Joe,

To do this, you will need to first create a new class that implements
ITemplate, in ITemplate.InstantiateIn method, you create other controls
that need to be put in the template and add to the container. Later, you
create an instance of your new class and assign to Repeater.ItemTemplate
property.

Here's MSDN document and example on this:

http://msdn2.microsoft.com/en-us/library/y0h809ak(VS.71).aspx


Please feel free to let me know if there's anything unclear. Thanks.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Walter Wang [MSFT]

Hi Joe,

To do this, you will need to first create a new class that implements
ITemplate, in ITemplate.InstantiateIn method, you create other controls
that need to be put in the template and add to the container. Later, you
create an instance of your new class and assign to Repeater.ItemTemplate
property.

Here's MSDN document and example on this:

http://msdn2.microsoft.com/en-us/library/y0h809ak(VS.71).aspx


Please feel free to let me know if there's anything unclear. Thanks.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Walter Wang [MSFT]

Hi Joe,

To do this, you will need to first create a new class that implements
ITemplate, in ITemplate.InstantiateIn method, you create other controls
that need to be put in the template and add to the container. Later, you
create an instance of your new class and assign to Repeater.ItemTemplate
property.

Here's MSDN document and example on this:

http://msdn2.microsoft.com/en-us/library/y0h809ak(VS.71).aspx


Please feel free to let me know if there's anything unclear. Thanks.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Joe C

Thanks Walter,

I'm on vacation right now but will give it a shot when I am back in the
office.

Regards,
Joe
 

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,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top