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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Moving/Positioning Controls on ASP webforms

  • 19-12-2012 5: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, Registered Users 2 Posts: 2,040 ✭✭✭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: 54,424 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, Registered Users 2 Posts: 806 ✭✭✭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: 54,424 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