|
-
Apr 8th, 2003, 08:42 AM
#1
Thread Starter
Member
Placeholder
Recently I placed some threads (questions) about creating
controls (dynamic) on a webform.
I received a useful tip to use a placeholder.
With this in mind , it is not very difficult to create controls from a xml file. But there is one big problems left :
When I add two labels to the placeholder they are placed next to each other. I want the second label on the next rule.
Is this possible? And are there other ways to place created controls at an exact location on the form?
greetings,
Krol
-
Apr 8th, 2003, 12:47 PM
#2
PowerPoster
When I add two labels to the placeholder they are placed next to each other. I want the second label on the next rule.
To solve this problem, it is pretty easy. I assume you are adding the controls to the placeholders control collection. If you are doing that, you just need to add a control between them. That control would be a literalcontrol with a br tag as the text:
Code:
LiteralControl lc = new LiteralControl("<br>");
Now, add lc in the placeholders control collection between the two label controls. This will put a line break in.
-
Apr 9th, 2003, 04:29 AM
#3
Thread Starter
Member
Thanks! It works!!!!
If you want to add multiple <br> at the placeholder and only
want to declare 1 literal you have to change the id of the
declared literal and then add it to the placeholder.
If you don't change the id, only one literal is added.
I seems logic, but it kept me puzzling for a minute..
Krol
-
Apr 9th, 2003, 06:48 AM
#4
PowerPoster
You can put any html and/or text in the literalcontrol:
LiteralControl lc = new LiteralControl("<br><br>");
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|