Wrox Programmer Forums
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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 October 9th, 2003, 10:30 AM
zac zac is offline
Registered User
Join Date: Oct 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamic Template Repeater Find Control

I need to find a control(Checkbox) that is contained in a template for a repeater.

I moved the itemtemplate to an ASCX file and then call it by

repOrders.ItemTemplate = Page.LoadTemplate("Item.ascx")

I used to have the itemtemplate coded at design time and then after submitting the form I used to check the value of the check boxes by doing

For a = 0 To repOrders.Items.Count - 1
            'Loop though Orders to see if any are checked
            checkbox = repOrders.Items(a).FindControl("CheckFlag")

However now that I have moved the itemtemplate to an ASCX i can no longer find the control "CheckFlag"

I have an incling what it could be but no means of knowing how to get there. The actual HTML produced by the ASCX dynamic template is

<input id="repOrders__ctl1__ctl0_CheckFlag" type="checkbox" name="repOrders:_ctl1:_ctl0:CheckFlag" />

And the old design time template produced

<input id="repOrders__ctl1_CheckFlag" type="checkbox" name="repOrders:_ctl1:CheckFlag" />

There is some kind of extra "ctl" which i presume means control level.

How could i access the "CheckFlag" control using the dynamic Itemtemplate.

Any help appreciate because I losing will to live.



Similar Threads
Thread Thread Starter Forum Replies Last Post
repeater control akssmv ASP.NET 2.0 Basics 1 August 20th, 2008 08:55 PM
Dynamic Dropdownlists in a repeater JadeCSharp ASP.NET 1.0 and 1.1 Basics 3 November 14th, 2007 06:34 PM
Help me with repeater control? forlife ASP.NET 2.0 Basics 1 July 14th, 2007 12:09 PM
pbm to find control ref in datagrid template forums.praveen VS.NET 2002/2003 0 March 13th, 2007 11:54 PM
Repeater Control abdul_owiusa General .NET 0 September 19th, 2005 10:00 AM

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