Ask a Question related to ASP.NET General, Design and Development.
-
Kurt #1
Need help with LoadControl
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 Guest
-
LoadControl and Validation Summary
I am working on a project that dynamically loads controls from within Page_init so that the viewstate is preserved. On post back the control saves... -
LoadControl and CType error
Hey. I'm trying to dynamically add User Controls to my page. It appears to work sometimes, but more often I get the error: Unable to cast object of... -
LoadControl performance
How is LoadControl's performance compared to adding a control directly on the WebForm designer? TWH -
When does LoadControl really load the control?
Hi, I'm loading a user control (.ascx) with LoadControl in a code-behind page. LoadControl returns successfully, and the valid reference it... -
loadcontrol
Will the state of a dynamically loaded control preserved in transitions between aspx pages hosting the control.? thanks -
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
[url]http://www.netomatix.com[/url]
"Kurt" <k_nojunk@larimore.net> wrote in message
news:OSG%23jvBQDHA.1748@TK2MSFTNGP11.phx.gbl...would> When I try to use LoadControl I get the error message below. Any help> be great.
>
> Kurt
>
> Control '_ctl0_Classification' of type 'TextBox' must be placed inside a
> form tag with runat=server
>
>
Naveen K Kohli Guest
-
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 [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Natty Gur Guest
-
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:uG1wKaFQDHA.3192@tk2msftngp13.phx.gbl...> 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 [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Kurt Guest
-
Kurt #5
Re: Need help with LoadControl
I got it this is what I used.
this.FindControl("Test").Controls.Add(offense);
"William F. Robertson, Jr." <wfrobertson@kpmg.com> wrote in message
news:%23QJScRLQDHA.1608@TK2MSFTNGP11.phx.gbl...> How are you trying to load it in code? Do you have a placeholder?
>
> bill
>
> "Kurt" <k_nojunk@larimore.net> wrote in message
> news:O0ZD4LKQDHA.3144@tk2msftngp13.phx.gbl...>> > How do I control that if I am loading a control dynamically?
> >
> > Kurt
> >
> > "Natty Gur" <natty@dao2com.com> wrote in message
> > news:uG1wKaFQDHA.3192@tk2msftngp13.phx.gbl...> >> > > 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 [url]http://www.developersdex.com[/url] ***
> > > Don't just participate in USENET...get rewarded for it!
> >
>
Kurt Guest
-
Natty Gur #6
Re: Need help with LoadControl
this.FindControl("FormName").Controls.Add(MyContro l);
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 [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Natty Gur Guest



Reply With Quote

