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. Adding ASP .NET Server controls on run time...

Adding ASP .NET Server controls on run time...

Scheduled Pinned Locked Moved ASP.NET
csharpcomsysadminhelptutorial
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.
  • F Offline
    F Offline
    fadee
    wrote on last edited by
    #1

    I was wondering a lot.. how to create ASP .NET Server controls on runtime without inserting them into ASPX file... check this article. http://support.microsoft.com/default.aspx?scid=kb;EN-US;317515#2 It tells how to add a Text Box on run time into webform though it does not have its entry in ASPX file. But the problem is: this text box has absolute location. Right? What if I want to place them in particular cell of table. Any idea? ------------------- Therez No Place like ... 127.0.0.1

    M 1 Reply Last reply
    0
    • F fadee

      I was wondering a lot.. how to create ASP .NET Server controls on runtime without inserting them into ASPX file... check this article. http://support.microsoft.com/default.aspx?scid=kb;EN-US;317515#2 It tells how to add a Text Box on run time into webform though it does not have its entry in ASPX file. But the problem is: this text box has absolute location. Right? What if I want to place them in particular cell of table. Any idea? ------------------- Therez No Place like ... 127.0.0.1

      M Offline
      M Offline
      mmikey7
      wrote on last edited by
      #2

      hi fadee, if you want to place TexBox in particular cell of table this is a one option: example in C#: System.Web.UI.WebControls.Table myTable = new Table(); System.Web.UI.WebControls.TableRow myRow = new TableRow(); System.Web.UI.WebControls.TableCell myCell = new TableCell(); System.Web.UI.WebControls.TextBox myTextBox = new TextBox(); myTextBox.TextMode = TextBoxMode.SingleLine; myTextBox.Text = "Some text"; myCell.Controls.Add(myTextBox); myRow.Cells.Add(myCell); myTable.Rows.Add(myRow); "A journey of a thousand miles must begin with a single step." -Chinese philosopher Lao Tzu

      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