Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > "Wrong" parent for TextBox controls in composite control

Reply
Thread Tools

"Wrong" parent for TextBox controls in composite control

 
 
Jonas
Guest
Posts: n/a
 
      01-30-2005
Hi!

I have built two very similar composite controls that consists of a number
of textboxes each.
In the PreRender-event I have the following code which I use to dynamically
set the TabIndex on the textboxes so that they get right in the flow of the
parent page.

Dim ctl As Control
For Each ctl In CType(sender, cmPerson).Controls
If TypeOf ctl Is TextBox Then
CType(ctl, TextBox).TabIndex += _tabIndexControl
End If
Next

One of my composite controls works just fine, when the parent page loads, I
set the _tabIndexControl value via a property and the code above is
executed. But on my other control, which has the same code, just different
textboxes and layout, the code do not find the textboxes in the Controls
collection.

Any tips?

TIA

Jonas


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET textbox loses text value in composite control but Textbox subclass doesn't!? ErwinP ASP .Net Web Controls 1 08-19-2005 01:50 PM
Composite vs non composite Controls Mike ASP .Net Web Controls 4 03-11-2005 05:47 AM
Losing Composite Control property that another Composite Control ... Chad ASP .Net Building Controls 0 02-01-2005 09:01 PM
Possible to create a composite control that has a child control that is a validator that validates the composite control itself? Jonathan Eric Miller ASP .Net Building Controls 2 07-22-2004 10:58 PM
Composite control with dynamic composite controls sleigh ASP .Net 1 02-12-2004 06:24 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57