Solved

Placeholder new line

Posted on 2003-11-12
3
590 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
Comment Utility
Add a label to the control that has as text "<br>".
0
 
LVL 12

Expert Comment

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

Expert Comment

by:preeth
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now