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 3230680
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:57:20+00:00 2026-05-17T16:57:20+00:00

I need a way to layout controls in a page. Let me ask you

  • 0

I need a way to layout controls in a page.
Let me ask you by example.
I have four different action buttons (Edit, Delete, etc..) that do the same actions on any page, but sometimes I want them laid out horizontally and some other times vertically, depending on which page is displaying them.
So I thought of placing all four buttons in a user control and manage their layout using some sort of template control.

Does such a control exist that is as flexible as ListView’s template management?
Of course a lazy solution is to place four buttons horizontally in a panel, and another four buttons vertically in another panel, and show/hide the panel that’s requested, but I don’t want to have two instances of the buttons; I just want one instance of each button, but in different layouts.

Feel free to add more tags to this.

  • 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-17T16:57:20+00:00Added an answer on May 17, 2026 at 4:57 pm

    Such thing can be achieved with CSS. I’m bad in CSS but I believe this works:

    HTML

    <div class="horizontal">
        <input type="button" value="1" />
        <input type="button" value="2" />
        <input type="button" value="3" />
        <input type="button" value="4" />
    </div>
    

    Two CSS classes you simply set which you need in the div element (you can wrap your buttons with UserControl and map div’s class to UserControl’s property)

      <head>
        <style type="text/css">
            .horizontal input 
            {
                margin:0px 2px 0px 2px;
            }
    
            .vertical input
            {
                display:block;
                margin:2px 0px 2px 0px;
            }
        </style>
      </head>
    

    Templated control is to strong for such easy task especially when you do not need to change template content.

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

Sidebar

Related Questions

I need the way to setup widgets inside other widget with different layouts... it
I have a project in which I need a way to display essentially a
I need a way to store application-level data (i.e. cross user sessions) in ASP.NET.
I need a way for a single variable to represent two kinds of objects
I need a way to programaticaly block and then later unblock specific websites based
I need a way to convert .doc or .docx extensions to .txt without installing
I need a way to insert new articles straight into my MediaWiki database without
I need a way to wait until a (Swing) JComponent is fully painted. This
I need a way to transform numeric HTML entities into their plain-text character equivalent.
I need a way in Perl to strip naughty things, such as XSS, image

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.