Ok I have an Accordion Panel in my VB.NET (asp/web) project. I dynamically add a number of buttons and labels with the following code (amount defined my data in SQL):
I am populating the Accordion dynamically using SQL DB data during the Page_Load server event. Buttons are added to the pane like this:
Private Sub addBtn(ByVal acp As AjaxControlToolkit.AccordionContentPanel, ByVal btnLabel As String)
'Adds a button to an Accordion Content Panel
Dim btn As New Button
btn.Text = btnLabel
Dim myLBL as new Label
mylbl.text = mDate.tostring 'Date from var passed in via SQL
AddHandler btn.Click, AddressOf BtnClick
I have a list of jobs with a jobID, I have the jobID appear in a button added just as yours on my accordion. However I also add the date of the job as a label next to each button. This works, buttons and labels get added except they are exactly after the previous control so the layout looks a mess. What I want is all the buttons going down on the left and the date label to its corresponding buttons right.
I think this can be done if I was able to addin a HTML <BR> after each control is added to the HTML but how do I do this, is there a control for just HTML, how do I add this dynamically, can anyone tell me a better way, perhaps using styles, although even then im unsure how to go about it.
Any help appreciated. Thanks in advance.