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 TextBox Runtime in ASP.NET 2008 (C#)

Adding TextBox Runtime in ASP.NET 2008 (C#)

Scheduled Pinned Locked Moved ASP.NET
csharphelpasp-netsysadmin
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.
  • V Offline
    V Offline
    varshavmane
    wrote on last edited by
    #1

    Hello All, I have 3 Textbox on my Page and each Textbox has Text Change Event. When User input a number in first textbox say for ex 5 then 5 new textboxes are added below that Textbox and similarly it happens for other 2 textbox also. I am adding these textbox to PlaseHolder control runtime but when i click save button i have to take all the values and save back to server but I am not getting the values of textbox which I have added at runtime. How i can solve this problem please help me.. Thanks.

    C 1 Reply Last reply
    0
    • V varshavmane

      Hello All, I have 3 Textbox on my Page and each Textbox has Text Change Event. When User input a number in first textbox say for ex 5 then 5 new textboxes are added below that Textbox and similarly it happens for other 2 textbox also. I am adding these textbox to PlaseHolder control runtime but when i click save button i have to take all the values and save back to server but I am not getting the values of textbox which I have added at runtime. How i can solve this problem please help me.. Thanks.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      The textbox doesn't exist, and so there's no viewstate, it's lost. Put a hidden control on your form and use js to store the text there.

      Christian Graus Driven to the arms of OSX by Vista.

      V 1 Reply Last reply
      0
      • C Christian Graus

        The textbox doesn't exist, and so there's no viewstate, it's lost. Put a hidden control on your form and use js to store the text there.

        Christian Graus Driven to the arms of OSX by Vista.

        V Offline
        V Offline
        varshavmane
        wrote on last edited by
        #3

        Thanks Christian, I used Javascript and its working fine. :)

        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