Need help with LoadControl

Discussion in 'ASP .Net' started by Kurt, Jul 1, 2003.

  1. Kurt

    Kurt Guest

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

    Kurt

    Control '_ctl0_Classification' of type 'TextBox' must be placed inside a
    form tag with runat=server
    Kurt, Jul 1, 2003
    #1
    1. Advertising

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

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

    --
    Naveen K Kohli
    http://www.netomatix.com
    "Kurt" <> wrote in message
    news:OSG%...
    > When I try to use LoadControl I get the error message below. Any help

    would
    > be great.
    >
    > Kurt
    >
    > Control '_ctl0_Classification' of type 'TextBox' must be placed inside a
    > form tag with runat=server
    >
    >
    Naveen K Kohli, Jul 1, 2003
    #2
    1. Advertising

  3. Kurt

    Natty Gur Guest

    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!
    Natty Gur, Jul 2, 2003
    #3
  4. Kurt

    Kurt Guest

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

    Kurt

    "Natty Gur" <> wrote in message
    news:...
    > 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!
    Kurt, Jul 2, 2003
    #4
  5. Kurt

    Kurt Guest

    I got it this is what I used.
    this.FindControl("Test").Controls.Add(offense);

    "William F. Robertson, Jr." <> wrote in message
    news:%...
    > How are you trying to load it in code? Do you have a placeholder?
    >
    > bill
    >
    > "Kurt" <> wrote in message
    > news:...
    > > How do I control that if I am loading a control dynamically?
    > >
    > > Kurt
    > >
    > > "Natty Gur" <> wrote in message
    > > news:...
    > > > 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!

    > >
    > >

    >
    >
    Kurt, Jul 2, 2003
    #5
  6. Kurt

    Natty Gur Guest

    this.FindControl("FormName").Controls.Add(MyControl);

    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!
    Natty Gur, Jul 3, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. huobazi
    Replies:
    1
    Views:
    681
    David Waz...
    Jul 3, 2003
  2. George Durzi

    LoadControl VirtualPath question

    George Durzi, Jul 31, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    474
    George Durzi
    Jul 31, 2003
  3. sunil

    loadcontrol

    sunil, Aug 11, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    497
    Dawn Baker
    Aug 13, 2003
  4. Thor W Hammer

    LoadControl performance

    Thor W Hammer, Aug 13, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,071
    Anders Borum
    Aug 22, 2003
  5. Justin Dutoit

    Help- LoadControl and Ctype error

    Justin Dutoit, Feb 23, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    729
    Sonu Kapoor [MVP]
    Feb 23, 2006
Loading...

Share This Page