?
Solved

ASP.NET - How to align a label with its MultiLine textbox

Posted on 2013-11-22
3
Medium Priority
?
3,798 Views
Last Modified: 2013-11-26
I am using Visual Studio 2005, I am using the FormView Control.  I have a text box with a a label on a form.  The TextBox TextMode is set to "MultiLine" and the Rows = 4; Width is "216px".  The label of the textbox is located at the bottom leftside of the Textbox (see the attachment).  I would like to lable to be at the upper leftside of the label.  Do you have a solution on how I can do this.

I would appreciate a response as soon as possible.  Lately, I've not received a response.  I've deleted the questions and googled for a solution.
form.png
0
Comment
Question by:cookiejar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Expert Comment

by:eli411
ID: 39670716
using VerticalAlignment = "Top" in your label
0
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 1000 total points
ID: 39670719
Set the vertical=align css property for the label :

<asp:Label ID="Label4" runat="server" Text="Message" Width="15%" Style="vertical-align: top;">
</asp:Label>
0
 
LVL 3

Assisted Solution

by:CAVcc
CAVcc earned 1000 total points
ID: 39670749
Just a guess here but it looks as though maybe you are using a table for your controls, maybe a div.  However you can use this example setting the valign property on the tablerow tag to "top".

Here is a small example and screen shot:

<body>
    <form id="form1" runat="server">
    <div>
   
        <table class="style1">
            <tr>
                <td valign="top">
                    <asp:Label ID="Label1" runat="server" Text="Description:" ></asp:Label>
                </td>
                <td valign="top">
                    <asp:TextBox ID="TextBox1" runat="server" Height="109px" Width="828px"
                        TextMode="MultiLine">No Description Available</asp:TextBox>
                </td>
            </tr>
        </table>
   
    </div>
    </form>
</body>
screen.PNG
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Suggested Courses

801 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