Solved

Placeholder new line

Posted on 2003-11-12
3
592 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

828 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