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. How to position textboxes that are created programmatically

How to position textboxes that are created programmatically

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

    Hi, I need some help on how to position a textbox, that I create in the VB 'code behind' page. My code: public txttest as New TextBox Public Sub Control_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init test.width=200 me.controls.add(txttest) Page.DataBind() End Sub How can I position this textbox, to diplay where I want it to be displayed. Say for instance in a certain table cell or in a div tag. Thanks

    P 1 Reply Last reply
    0
    • P playout

      Hi, I need some help on how to position a textbox, that I create in the VB 'code behind' page. My code: public txttest as New TextBox Public Sub Control_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init test.width=200 me.controls.add(txttest) Page.DataBind() End Sub How can I position this textbox, to diplay where I want it to be displayed. Say for instance in a certain table cell or in a div tag. Thanks

      P Offline
      P Offline
      Plunging_Falcon
      wrote on last edited by
      #2

      To position a control somewhere on the page you need to have some sort of a place holder (e.g. a panel, a table and so on). Just place a panel (per say) on the page and then use panel.Controls.Add(textbox)

      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