Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Moving/Positioning Controls on ASP webforms

Options
  • 19-12-2012 6:29pm
    #1
    Closed Accounts Posts: 8,199 ✭✭✭


    I was messing around earlier with my first attempt at an ASP site. I have Visual Studio and I created an ASP webforms site but I found it quite restrictive. I don't know if I was doing something wrong or hadn't changed some setting, but I found while I could drag and drop controls, moving them or re-positioning them seemed extremely restrictive. Perhaps I'm thinking too much of WinForms where I can move controls around as much as I want, but the ASP webforms option seemed to be very difficult to use.

    Is there something I need to do in order to "free" these controls up to let me re-position and move them around easier? I'm a complete beginner with ASP/ASP.Net.

    Thanks!


Comments

  • Registered Users Posts: 2,022 ✭✭✭Colonel Panic


    First of all, I would suggest not using WinForms, partially because of the problems you are having. An alternative is ASP.Net MVC, which is one of the better web frameworks that I've come across. The problem there is that you will need to know how to lay stuff out with HTML and CSS instead if you take that route.

    And to answer your actual question... I *think* that WebForms has layout containers similar to those in System.Windows.Forms but I might not be remembering correctly.


  • Administrators Posts: 53,752 Admin ✭✭✭✭✭awec


    Using the drag-and-drop method to design pages is going to be restrictive.

    I'd say edit the HTML and CSS directly if you can.


  • Registered Users Posts: 795 ✭✭✭tawfeeredux


    Drag & drop is only really for adding elements, such as buttons, labels, textboxes, etc. on to your page. As awec suggests, you should edit the resulting Html and add styling with CSS. Many of the controls will have layout & appearance properties available in the Design view (such as height, width, background colour, borders, etc.), but using CSS gives you more options (positioning with float, margins between elements, padding, display properties).


  • Administrators Posts: 53,752 Admin ✭✭✭✭✭awec


    Drag and drop with winforms is slightly better than webforms too, your visual designer code in winforms doesn't have to be translated to HTML.


Advertisement