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. create textbox dynumicaly and add to placeholder

create textbox dynumicaly and add to placeholder

Scheduled Pinned Locked Moved ASP.NET
question
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.
  • M Offline
    M Offline
    mehran asg
    wrote on last edited by
    #1

    hi I want in button_click create a text box and add to placeholder. in fact, I want by each click add a textbox to my page. how? thanks

    A 1 Reply Last reply
    0
    • M mehran asg

      hi I want in button_click create a text box and add to placeholder. in fact, I want by each click add a textbox to my page. how? thanks

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      Use Javascript.. If you dont have any serverside code to run. Create a textbox using Javascript :

      function createTextBox()
      {
      var tb = document.createElement('input');
      tb.id = new Date().getTime().toString().substr(5) + Math.floor(Math.random() * 100).toString() + '_dyntextbox'; //Random ID
      tb.type = 'text';
      document.appendChild(tb);

      }

      This will create a textbox dynamically in the document. :thumbsup:

      Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


      My Latest Articles-->** Microsoft Bing MAP using Javascript
      CLR objects in SQL Server 2005
      Uncommon C# Keywords
      /xml>

      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