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. Dynamic create Textbox as per database

Dynamic create Textbox as per database

Scheduled Pinned Locked Moved ASP.NET
helpdatabase
8 Posts 5 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.
  • R Offline
    R Offline
    Ravi_21
    wrote on last edited by
    #1

    Hi i have one urgent problem i want to generate the textbox from the code section and after that i want to read the values of those textboxes but i cant get the solution right Please help me its urgent for me

    A B N C 4 Replies Last reply
    0
    • R Ravi_21

      Hi i have one urgent problem i want to generate the textbox from the code section and after that i want to read the values of those textboxes but i cant get the solution right Please help me its urgent for me

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      Ravi_21 wrote:

      i have one urgent problem

      Ravi_21 wrote:

      Please help me its urgent for me

      Not for All. So dont ask like that.

      Ravi_21 wrote:

      i want to generate the textbox from the code section and after that i want to read the values

      This can be done very easily. Did you try it your self ? or want some else do for you. Read the value from datbase. Create Object of TextBox Class. Add value to the Text property of TextBox. So first try it , if you stuck anywhere in this steps then ask.

      cheers, Abhijit My Recent Article : Beginner's Guide to ASP.NET Application Folder

      R 1 Reply Last reply
      0
      • A Abhijit Jana

        Ravi_21 wrote:

        i have one urgent problem

        Ravi_21 wrote:

        Please help me its urgent for me

        Not for All. So dont ask like that.

        Ravi_21 wrote:

        i want to generate the textbox from the code section and after that i want to read the values

        This can be done very easily. Did you try it your self ? or want some else do for you. Read the value from datbase. Create Object of TextBox Class. Add value to the Text property of TextBox. So first try it , if you stuck anywhere in this steps then ask.

        cheers, Abhijit My Recent Article : Beginner's Guide to ASP.NET Application Folder

        R Offline
        R Offline
        Ravi_21
        wrote on last edited by
        #3

        i have created the textbox from the database but now i want to read the text which is in textboxes and save to another table

        A 1 Reply Last reply
        0
        • R Ravi_21

          i have created the textbox from the database but now i want to read the text which is in textboxes and save to another table

          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #4

          When you have creared those Textbox, you have already given a ID.So read those id and store it in a database table.

          cheers, Abhijit My Recent Article : Beginner's Guide to ASP.NET Application Folder

          R 1 Reply Last reply
          0
          • A Abhijit Jana

            When you have creared those Textbox, you have already given a ID.So read those id and store it in a database table.

            cheers, Abhijit My Recent Article : Beginner's Guide to ASP.NET Application Folder

            R Offline
            R Offline
            Ravi_21
            wrote on last edited by
            #5

            i have created the textbox in the page load event and i want the value after button click event and one more thing how can i map these result to the new database table as the number of textboxes are increase or decrease

            1 Reply Last reply
            0
            • R Ravi_21

              Hi i have one urgent problem i want to generate the textbox from the code section and after that i want to read the values of those textboxes but i cant get the solution right Please help me its urgent for me

              B Offline
              B Offline
              Brij
              wrote on last edited by
              #6

              Get the Textboxid and from that get the value.Can you show your peice of code?

              Cheers!! Brij

              1 Reply Last reply
              0
              • R Ravi_21

                Hi i have one urgent problem i want to generate the textbox from the code section and after that i want to read the values of those textboxes but i cant get the solution right Please help me its urgent for me

                N Offline
                N Offline
                N a v a n e e t h
                wrote on last edited by
                #7

                Ravi_21 wrote:

                i want to generate the textbox from the code section and after that i want to read the values of those textboxes but i cant get the solution right

                When you generate textbox from page load event, ASP.NET won't maintain viewstate for it. You need to create it before viewstate is loaded. I'd suggest to use a GridView with template columns and put your textbox inside the template column. You don't need to worry about the viewstate issues then. To get the textbox values back, loop through all rows and use FindControl() to find the text box from grid.

                Navaneeth How to use google | Ask smart questions

                1 Reply Last reply
                0
                • R Ravi_21

                  Hi i have one urgent problem i want to generate the textbox from the code section and after that i want to read the values of those textboxes but i cant get the solution right Please help me its urgent for me

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

                  Dynamically created textboxes always have issues with viewstate. The best bet, is to just create them statically and instead, show or hide them in code.

                  Christian Graus Driven to the arms of OSX by Vista.

                  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