Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 10th, 2004, 02:09 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default Repeater and ItemTemplate

Hello,

Is it possible to setup the ItemTemplate and AlternateItemTemplate in the code-behind? If so, how to, or where is a good resource?

Thanks,

Brian
__________________
Brian
 
Old September 10th, 2004, 02:15 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Brian,

AFAIK, there is no way of creating the templates entirely on the fly. However, using LoadTemplate you can load a template from disk and assign it to your ItemTemplate and AlternatingItemTemplate templates.

Right before you load the template, you can build up your ItemTemplate string, write it to disk and then read it again using LoadTemplate. A bit dirty, but it may be a good work around in certain scenarios.

Cheers,

Imar
 
Old September 10th, 2004, 02:37 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Thanks, I'll try that.

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove ItemTemplate Item - Not EditItemTemplate rsearing ASP.NET 2.0 Basics 0 July 24th, 2007 08:41 PM
GridView Checkbox ItemTemplate angelicagm ASP.NET 2.0 Professional 3 May 31st, 2007 04:44 AM
How to Use ItemTemplate Editor wirerider ASP.NET 2.0 Basics 0 February 18th, 2006 02:59 PM
State of CheckBox in ItemTemplate of DataGrid bpgadhia Classic ASP Professional 1 August 19th, 2004 01:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.