Need help with LoadControl

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kurt

    Need help with LoadControl

    When I try to use LoadControl I get the error message below. Any help would
    be great.

    Kurt

    Control '_ctl0_Classifi cation' of type 'TextBox' must be placed inside a
    form tag with runat=server


  • Naveen K Kohli

    #2
    Re: Need help with LoadControl

    Any control that can cause PostBAck should be placed within <form> tags...

    <form
    ... All PostBack controls go here.
    </form>

    --
    Naveen K Kohli

    "Kurt" <k_nojunk@larim ore.net> wrote in message
    news:OSG%23jvBQ DHA.1748@TK2MSF TNGP11.phx.gbl. ..[color=blue]
    > When I try to use LoadControl I get the error message below. Any help[/color]
    would[color=blue]
    > be great.
    >
    > Kurt
    >
    > Control '_ctl0_Classifi cation' of type 'TextBox' must be placed inside a
    > form tag with runat=server
    >
    >[/color]


    Comment

    • Natty Gur

      #3
      Re: Need help with LoadControl

      Hi,
      To be more accurate. All "web forms" controls must be under Form tag
      with runat=server attribute. this attribute guarantee the postback
      behavior.

      Natty Gur, CTO
      Dao2Com Ltd.
      28th Baruch Hirsch st. Bnei-Brak
      Israel , 51114

      Phone Numbers:
      Office: +972-(0)3-5786668
      Fax: +972-(0)3-5703475
      Mobile: +972-(0)58-888377

      Know the overall picture


      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      • Kurt

        #4
        Re: Need help with LoadControl

        How do I control that if I am loading a control dynamically?

        Kurt

        "Natty Gur" <natty@dao2com. com> wrote in message
        news:uG1wKaFQDH A.3192@tk2msftn gp13.phx.gbl...[color=blue]
        > Hi,
        > To be more accurate. All "web forms" controls must be under Form tag
        > with runat=server attribute. this attribute guarantee the postback
        > behavior.
        >
        > Natty Gur, CTO
        > Dao2Com Ltd.
        > 28th Baruch Hirsch st. Bnei-Brak
        > Israel , 51114
        >
        > Phone Numbers:
        > Office: +972-(0)3-5786668
        > Fax: +972-(0)3-5703475
        > Mobile: +972-(0)58-888377
        >
        > Know the overall picture
        >
        >
        > *** Sent via Developersdex http://www.developersdex.com ***
        > Don't just participate in USENET...get rewarded for it![/color]


        Comment

        • Kurt

          #5
          Re: Need help with LoadControl

          I got it this is what I used.
          this.FindContro l("Test").Contr ols.Add(offense );

          "William F. Robertson, Jr." <wfrobertson@kp mg.com> wrote in message
          news:%23QJScRLQ DHA.1608@TK2MSF TNGP11.phx.gbl. ..[color=blue]
          > How are you trying to load it in code? Do you have a placeholder?
          >
          > bill
          >
          > "Kurt" <k_nojunk@larim ore.net> wrote in message
          > news:O0ZD4LKQDH A.3144@tk2msftn gp13.phx.gbl...[color=green]
          > > How do I control that if I am loading a control dynamically?
          > >
          > > Kurt
          > >
          > > "Natty Gur" <natty@dao2com. com> wrote in message
          > > news:uG1wKaFQDH A.3192@tk2msftn gp13.phx.gbl...[color=darkred]
          > > > Hi,
          > > > To be more accurate. All "web forms" controls must be under Form tag
          > > > with runat=server attribute. this attribute guarantee the postback
          > > > behavior.
          > > >
          > > > Natty Gur, CTO
          > > > Dao2Com Ltd.
          > > > 28th Baruch Hirsch st. Bnei-Brak
          > > > Israel , 51114
          > > >
          > > > Phone Numbers:
          > > > Office: +972-(0)3-5786668
          > > > Fax: +972-(0)3-5703475
          > > > Mobile: +972-(0)58-888377
          > > >
          > > > Know the overall picture
          > > >
          > > >
          > > > *** Sent via Developersdex http://www.developersdex.com ***
          > > > Don't just participate in USENET...get rewarded for it![/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • Natty Gur

            #6
            Re: Need help with LoadControl

            this.FindContro l("FormName").C ontrols.Add(MyC ontrol);

            Natty Gur, CTO
            Dao2Com Ltd.
            28th Baruch Hirsch st. Bnei-Brak
            Israel , 51114

            Phone Numbers:
            Office: +972-(0)3-5786668
            Fax: +972-(0)3-5703475
            Mobile: +972-(0)58-888377

            Know the overall picture


            *** Sent via Developersdex http://www.developersdex.com ***
            Don't just participate in USENET...get rewarded for it!

            Comment

            Working...