asp.net - Arranging dynamically created controls on a web form -
I am a newbie if it comes to web site development. I would like to create a web form that will include defined controls in an XML file. I mean that I am reading the XML file inside the Page_load function and designating all the dynamically defined controls in the file. This fast is very easy.
Let me, however, have another problem, namely layout. When I add a new control on my form, then it is placed next to the control that was made earlier, how can I put them under each other or put some space between them and before them? I thought that would help me to use placeholder control, but I can not find any such quality, which will change the parental control situation by it.
How do I create a single control here:
labeled lbl = new label (); Lbl.ID = "lbl"; Lbl.Text = "test"; PlaceHolderMain.Controls.Add (LbL);
Text "> You have a few options:
- Additional control Such as control, where the text is HTML to you such as
- Place multiple placeholder controls for each appropriate section.
- Position the CSS Use control where you want them. I am not a CSS expert but it can be done, but it requires understanding of CSS positioning.
- Add control to the original control, such as a table, so that you can add control to a table cell within the line. This would mean to add rows and cells to the table, but this gives you more control over layout
Hope this can give you some tips that can help.
Comments
Post a Comment