Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. About the control positioning in asp.net

About the control positioning in asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-net
4 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Abhishek Rana
    wrote on last edited by
    #1

    Hi all I am a new user of dotnet I want to set the default setting of control so that I can paste the control any where in asp page

    C M U 3 Replies Last reply
    0
    • A Abhishek Rana

      Hi all I am a new user of dotnet I want to set the default setting of control so that I can paste the control any where in asp page

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      I suspect you're used to winforms. ASP.NET generates HTML, which is a flow design. It's not about pasting a control into a specific location, you design the flow of your page. You can use CSS to position things, but absolute positions, while possible, are generally a bad idea. Your site should work to fit any users screen resolution.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      1 Reply Last reply
      0
      • A Abhishek Rana

        Hi all I am a new user of dotnet I want to set the default setting of control so that I can paste the control any where in asp page

        M Offline
        M Offline
        mr_muskurahat
        wrote on last edited by
        #3

        if you are talking about visual inheritance in windows forms application then you need to understand asp.net masterpages.. as far as user controls are concerned you create and place where ever you want....and for positioning you can have style sheet and themes for server side control at a common place..

        Government Dyal Singh College Lahore.

        1 Reply Last reply
        0
        • A Abhishek Rana

          Hi all I am a new user of dotnet I want to set the default setting of control so that I can paste the control any where in asp page

          U Offline
          U Offline
          User 3418241
          wrote on last edited by
          #4

          There are a few ways of positioning controls. As mentioned in the previous replys, your best bet is to use a style sheet(css) to position controls on your web page. 1)You can create tables with rows and columns and basically just drag and drop controls into table cells and let them postion themselves but I don't recommend this. You'll run into a ton of cross browser positioning issues. 2)Use the cssClass attribute of your control and assign it to a class in your style sheet. Your css class can be set to postion a control relative to other controls on your page, or set you control to an absolute position on the page. Personally I like using relative postion to something like a main div on the page. Using relative postion will keep your controls in the same spot relative to the main div when a user resizes the page. Using absolute position will leave a control in the same spot when a user resizes the page. You might want to play around with both till you get comfortable... Css examples: .relativeControl { display:block; postion:relative; top: 100px; left: 100px; } .absoluteControl { display:inline; positon:absolute; z-index: 100; top: 100px; left: 100px; } I hope this helps. Have fun :)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups