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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. How do add controls from 'codebehind' ?

How do add controls from 'codebehind' ?

Scheduled Pinned Locked Moved ASP.NET
xmlquestion
9 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
    tina newcoder
    wrote on last edited by
    #1

    I have a table, i m adding rows in this table through the code-behind (.cs file). Is there any way to add asp:textbox or asp:Button in this table through the code-behind ??? The position (row no. in the table) depends on the data present in the xml file... :)

    S 1 Reply Last reply
    0
    • T tina newcoder

      I have a table, i m adding rows in this table through the code-behind (.cs file). Is there any way to add asp:textbox or asp:Button in this table through the code-behind ??? The position (row no. in the table) depends on the data present in the xml file... :)

      S Offline
      S Offline
      Sherin Iranimose
      wrote on last edited by
      #2

      Try this 1[^] 2[^]

      EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.

      T 1 Reply Last reply
      0
      • S Sherin Iranimose

        Try this 1[^] 2[^]

        EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.

        T Offline
        T Offline
        tina newcoder
        wrote on last edited by
        #3

        thanx Sherin Iranimose How to add event handlers to these controls >

        S 1 Reply Last reply
        0
        • T tina newcoder

          thanx Sherin Iranimose How to add event handlers to these controls >

          S Offline
          S Offline
          Sherin Iranimose
          wrote on last edited by
          #4

          C# control_Name.Event_Name += new EventHandler(Function_Name); vb AddHandler control_Name.Event_Name, AddressOf Function_Name http://support.microsoft.com/kb/317794[^]

          EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.

          T 1 Reply Last reply
          0
          • S Sherin Iranimose

            C# control_Name.Event_Name += new EventHandler(Function_Name); vb AddHandler control_Name.Event_Name, AddressOf Function_Name http://support.microsoft.com/kb/317794[^]

            EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.

            T Offline
            T Offline
            tina newcoder
            wrote on last edited by
            #5

            Sherin Iranimose wrote:

            C# control_Name.Event_Name += new EventHandler(Function_Name);

            Thanx

            C 1 Reply Last reply
            0
            • T tina newcoder

              Sherin Iranimose wrote:

              C# control_Name.Event_Name += new EventHandler(Function_Name);

              Thanx

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

              But, if your controls are added in page load or later, the event tree won't be built so the events will not fire.

              Christian Graus Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.

              S T 2 Replies Last reply
              0
              • C Christian Graus

                But, if your controls are added in page load or later, the event tree won't be built so the events will not fire.

                Christian Graus Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.

                S Offline
                S Offline
                Sherin Iranimose
                wrote on last edited by
                #7

                You are right. :) But I have a doubt about 'page load'....

                EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.

                1 Reply Last reply
                0
                • C Christian Graus

                  But, if your controls are added in page load or later, the event tree won't be built so the events will not fire.

                  Christian Graus Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.

                  T Offline
                  T Offline
                  tina newcoder
                  wrote on last edited by
                  #8

                  Christian Graus wrote:

                  But, if your controls are added in page load or later, the event tree won't be built so the events will not fire.

                  Then, whats the solution ? where else in the code-behind the controls can be added ?

                  S 1 Reply Last reply
                  0
                  • T tina newcoder

                    Christian Graus wrote:

                    But, if your controls are added in page load or later, the event tree won't be built so the events will not fire.

                    Then, whats the solution ? where else in the code-behind the controls can be added ?

                    S Offline
                    S Offline
                    Sherin Iranimose
                    wrote on last edited by
                    #9

                    Try it by adding on page load.

                    EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.

                    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