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. Best way to swap places of controls? [modified]

Best way to swap places of controls? [modified]

Scheduled Pinned Locked Moved ASP.NET
questioncomsysadmindata-structuresperformance
3 Posts 2 Posters 0 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.
  • L Offline
    L Offline
    livez
    wrote on last edited by
    #1

    Hello! I´ve got a couple of placeholders like this: asp:PlaceHolder ID="Pl1" runat="server"> <a href="http://www.mypage1.com" target="_blank">Click here</a> </asp:PlaceHolder> asp:PlaceHolder ID="Pl2" runat="server"> <a href="http://www.mypage2.com" target="_blank">Or click here</a> </asp:PlaceHolder> asp:PlaceHolder ID="Pl3" runat="server"> <a href="http://www.mypage3.com" target="_blank">or Click here</a> </asp:PlaceHolder> Depending of a couple of things I want to swap places between the placeholders. What is the best way to do this, performance-wise? I´ve had a solution where I remove placeholders and put them back in the controll-tree in the order I want them to be in, but this does not feel so efficient. Is there some other way? /regards

    modified on Thursday, September 24, 2009 10:30 AM

    G 1 Reply Last reply
    0
    • L livez

      Hello! I´ve got a couple of placeholders like this: asp:PlaceHolder ID="Pl1" runat="server"> <a href="http://www.mypage1.com" target="_blank">Click here</a> </asp:PlaceHolder> asp:PlaceHolder ID="Pl2" runat="server"> <a href="http://www.mypage2.com" target="_blank">Or click here</a> </asp:PlaceHolder> asp:PlaceHolder ID="Pl3" runat="server"> <a href="http://www.mypage3.com" target="_blank">or Click here</a> </asp:PlaceHolder> Depending of a couple of things I want to swap places between the placeholders. What is the best way to do this, performance-wise? I´ve had a solution where I remove placeholders and put them back in the controll-tree in the order I want them to be in, but this does not feel so efficient. Is there some other way? /regards

      modified on Thursday, September 24, 2009 10:30 AM

      G Offline
      G Offline
      Gamzun
      wrote on last edited by
      #2

      didn't exactly get what you trying to do but I can suggest you can use javascript.

      L 1 Reply Last reply
      0
      • G Gamzun

        didn't exactly get what you trying to do but I can suggest you can use javascript.

        L Offline
        L Offline
        livez
        wrote on last edited by
        #3

        I would really prefer to do this serverside. Also, the placeholder can contain a number of things, not necessarily a href.

        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