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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to place controls one below another

how to place controls one below another

Scheduled Pinned Locked Moved ASP.NET
designhelptutorial
2 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.
  • H Offline
    H Offline
    harithadotnet
    wrote on last edited by
    #1

    Hi I have created one image control and 2 link button controls dynamically and added those controls to panel. when i build the application these 3 controls are appearing side by side but i want to display one below another. my code is protected System.Web.UI.WebControls.Panel p1; ImageButton img; LinkButton links; LinkButton linkb; Label l1; private void Page_Load(object sender, System.EventArgs e) { Session["impath"]="pg/dhee"; for (int i = 1; i < 6; i++) { links=new LinkButton(); linkb=new LinkButton(); img = new ImageButton(); img.ID = "img" +i.ToString(); img.ImageUrl="pg/dhee/thumbs/"+ i +".jpg"; links.ID="ls"+i.ToString(); linkb.ID="lb"+i.ToString(); links.Text="800*600"; linkb.Text="1024*768"; l1.Text=" | "; p1.Controls.Add(img); p1.Controls.Add(links); p1.Controls.Add(l1); p1.Controls.Add(linkb); } } how to do this plz help me Thanks in advance

    Haritha

    N 1 Reply Last reply
    0
    • H harithadotnet

      Hi I have created one image control and 2 link button controls dynamically and added those controls to panel. when i build the application these 3 controls are appearing side by side but i want to display one below another. my code is protected System.Web.UI.WebControls.Panel p1; ImageButton img; LinkButton links; LinkButton linkb; Label l1; private void Page_Load(object sender, System.EventArgs e) { Session["impath"]="pg/dhee"; for (int i = 1; i < 6; i++) { links=new LinkButton(); linkb=new LinkButton(); img = new ImageButton(); img.ID = "img" +i.ToString(); img.ImageUrl="pg/dhee/thumbs/"+ i +".jpg"; links.ID="ls"+i.ToString(); linkb.ID="lb"+i.ToString(); links.Text="800*600"; linkb.Text="1024*768"; l1.Text=" | "; p1.Controls.Add(img); p1.Controls.Add(links); p1.Controls.Add(l1); p1.Controls.Add(linkb); } } how to do this plz help me Thanks in advance

      Haritha

      N Offline
      N Offline
      nareshss
      wrote on last edited by
      #2

      Hi Haritha ... U can put those controls in a table . so that u will get exactly wer do u want ... Otherwise u can c the LAYOUT option at the top of ur IDE , in that click on "POSITION" after that click "Absolute-Postion Options " , there u can set ... If u kw this ok otherwise it can usefull for u ... Bye Naresh.s.s.

      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