Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set the TabIndex of a control added to a placeholder
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00711457
Message ID:
00711846
Views:
8
Glad that worked for you.

>Cathi,
>
>Who do I make the check out to? Thanks, this saves me a great deal of effort.
>
>Doug
>
>>Hi Doug,
>>
>>To use the Rows property you must first set the TextMode property of the TextBox to TextBoxMode.MultiLine.
>>
>>>All,
>>>
>>>I just noticed that the Web Control TextBox has both Rows and Columns as attributes, yet it discards any Rows value above 1 when it is rendered. I was hoping I could tweak the control to resemble a TextArea, since ASPNET does not have a native TextArea control (which would then respect the TabIndex setting I need).
>>>
>>>Is the Rows attribute ignored by design, or is there a setting I need to get .NET runtime to respect the design-time attribute and render it?
>>>
>>>Just Wondering,
>>>Doug
>>>>Cathi,
>>>>
>>>>Good response - I gave you points (I think I owe you a bunch more too).
>>>>
>>>>However, as I should have pointed out, the control I am adding is an HTMLTextArea - so TabIndex does not come up in Intellisense and generates a compile error.
>>>>
>>>>Any work arounds?
>>>>
>>>>Thanks for your help,
>>>>Doug
>>>>>Web Controls have a TabIndex property that you can set for the order you want to display the items. After you dynamically add the new control, you can set it's TabIndex to be in the order you want. Here is a sample in the page's load method:
>>>>>
>>>>>
>>>>>Dim TextBox4 As New TextBox()
>>>>>PlaceHolder1.Controls.Add(TextBox4)
>>>>>textbox4.TabIndex = 2
>>>>>
>>>>>
>>>>>>All,
>>>>>>
>>>>>>I have a webform where I dynamically add controls to a placeholder.
>>>>>>
>>>>>>All of the static entries on my form have TabIndex values, so when I add controls to the placeholder and then tab through the fields on the web form the controls within the placeholder are the last to be accessed, even though they render in the middle of the page. How can I set the TabIndex value of each control I add to the PlaceHolder?
>>>>>>
>>>>>>".NET - Making the easy things hard."
>>>>>>TIA,
>>>>>>Doug
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform