Solved

Placeholder new line

Posted on 2003-11-12
3
591 Views
Last Modified: 2009-11-03
I'm using a placeholder to hold rows of controls (textboxes and dropdownlists) and I'm looking for a way to add them so that I get eleven columns in each row.

My problem is now that if the controls don't take up the entire width of the page, then a control that I intended to go on the row below ends up on the row above.

To resolve the problem I am currently adding an invisible label to take up the rest of the space in the row, but is there some way to push the control down to the next line?

Thanks

0
Comment
Question by:Gezna
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
roverm earned 500 total points
ID: 9730944
Add a label to the control that has as text "<br>".
0
 
LVL 12

Expert Comment

by:roverm
ID: 9730947
Or place all controls inside a table. Then you can use <TR></TR> to define your rows.
0
 

Expert Comment

by:preeth
ID: 9739972
Hope this works for u,

For intCounter = 0 To l_dtDtattable.Rows.Count - 1 'ViewState("ProductFieldCount")
                Dim ll As Integer
                ll = intCounter

                Dim litLabel As System.Web.UI.LiteralControl
                Dim txtTextBox As System.Web.UI.WebControls.TextBox
                Dim radRadiolist As System.Web.UI.WebControls.RadioButtonList

                'add textbox control
                txtTextBox = New System.Web.UI.WebControls.TextBox()
                txtTextBox.ID = Trim(l_dtDtattable.Rows(ll).Item("QID"))
                txtTextBox.Text = Trim(l_dtDtattable.Rows(ll).Item("QID"))
                txtTextBox.Width = System.Web.UI.WebControls.Unit.Pixel(40)
                'txt_qid1.Width = System.Web.UI.WebControls.Unit.Pixel(60)
                Me.PlaceHolder1.Controls.Add(txtTextBox)

                'add literal Controls
                litLabel = New System.Web.UI.LiteralControl()
                litLabel.Text = "<b> " & l_dtDtattable.Rows(ll).Item("Questionn") & ":</b>"
                Me.PlaceHolder1.Controls.Add(litLabel)

                'add  Radiolist controls
                radRadiolist = New System.Web.UI.WebControls.RadioButtonList()
                radRadiolist.ID = "rad" & Trim(l_dtDtattable.Rows(ll).Item("QID"))
                radRadiolist.Items.Add(l_dtDtattable.Rows(ll).Item("Choice_1"))
                radRadiolist.Items.Add(l_dtDtattable.Rows(ll).Item("Choice_2"))
                radRadiolist.Items.Add(l_dtDtattable.Rows(ll).Item("Choice_3"))
                radRadiolist.Items.Add(l_dtDtattable.Rows(ll).Item("Choice_4"))
                Me.PlaceHolder1.Controls.Add(radRadiolist)
            Next


0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question