Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6780653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:31:52+00:00 2026-05-26T16:31:52+00:00

I am using C# visual studio 2010 to develop an ASP.NET website. I dynamically

  • 0

I am using C# visual studio 2010 to develop an ASP.NET website.

I dynamically create a checkbox at run time.

CheckBox chkbox = new CheckBox();
chkbox.ID = "chk" + checkboxID;

// Add our checkbox to the panel
dynamicPanel.Controls.Add(chkbox);
chkbox.Text = checkboxName;

By default, the label is displayed to the right of the checkbox. I can successfully move the label from side to side by adjusting chkbox.TextAlign = TextAlign.Right / Left.

What I can not figure out for the life of me is how to set the Text above the check box.

I am not looking for any kind of hack like, verticle-align:-3px as this will not work for me because I let the user pick the font and size of the text. It will not always be -3px in depth.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:31:52+00:00Added an answer on May 26, 2026 at 4:31 pm

    Set the text align property to TextAlign.Left then use CSS to set the label’s display to: block.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can I develop asp.net 3.5/2.0 projects using Visual Studio 2010? Or I will be
I'm developing a website using Asp.Net 3.5 in Visual Studio 2008 and we use
I've been developing an application using asp.net, Visual Studio 2010 and Crystal Reports 13.
I want to be able to develop code using Visual Studio 2010. I just
I'm using Visual Studio 2010 RTM with .NET/Entity Framework 4 RTM with a model
I'm using the Visual Studio 2010 RC for .NET 4.0 and I'm trying to
I am using SharePoint Foundation (Sharepoint 2010) to develop a workflow in Visual Studio
I am using Visual Studio 2010 and using web deployment to promote the .Net
Using Visual Studio 2010 beta, when I run my application within the IDE for
Is it possible to develop an ASP.NET Web Service using the Visual Web Developer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.