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 textbox postback

dynamic textbox postback

Scheduled Pinned Locked Moved ASP.NET
question
5 Posts 3 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.
  • T Offline
    T Offline
    test 09
    wrote on last edited by
    #1

    hi.. I created dynamic textboxes in repeater control... on post back how do i store values of textboxes

    P A 2 Replies Last reply
    0
    • T test 09

      hi.. I created dynamic textboxes in repeater control... on post back how do i store values of textboxes

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

      Try

      string value = Request.Form["TextBoxName"];

      Regards, Prakash Kalakoti

      T 1 Reply Last reply
      0
      • P PSK_

        Try

        string value = Request.Form["TextBoxName"];

        Regards, Prakash Kalakoti

        T Offline
        T Offline
        test 09
        wrote on last edited by
        #3

        i had add button which adds textboxes how do i get all the text box values as text boxs are in repeater control

        P 1 Reply Last reply
        0
        • T test 09

          i had add button which adds textboxes how do i get all the text box values as text boxs are in repeater control

          P Offline
          P Offline
          PSK_
          wrote on last edited by
          #4

          You can use a counter to generate the ids of the textbox. Every time you generate a text box increment the counter by one and store the value back to session or viewstate. Your code that generates the text box will look something like this.

          TextBox newTextBox = new TextBox();
          newTextBox.ID = "repeaterTextBox" + Viewstate[“COUNTER”].ToString();
          //Add one to counter present in the viewstate and save it back to the viewstate.

          At the time of retrieving just loop till the value of counter, you can generate all the ids back, by which you can get the values.

          Regards, Prakash Kalakoti

          1 Reply Last reply
          0
          • T test 09

            hi.. I created dynamic textboxes in repeater control... on post back how do i store values of textboxes

            A Offline
            A Offline
            Amar Chaudhary
            wrote on last edited by
            #5

            you can try the options provided or need to create dynamic controls at on init of the page.

            It is Good to be Important but! it is more Important to be Good

            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