<div>Really I do not understand how databinding can occur since there is no ID or name element</div> <div>Even if to put
it the Render() overwrites it by some pseudo-output</div> <div> </div> <div>If to insert ID or/and runat=server
in aspx for
<ChildNR
runat="server" text=<%#"Hello"%>
/> ,
then to beforementioned errors I get additional compilation errors Error 1 The type name 'ChildNR' does not exist in the type WCLTest.ChildControlNR' e:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\tstpagedatabind\131a7dc2\74829726\App_Web_26kmhdyk.0.cs
If I add name element to it, then I get additionally
Error 3 Type 'WCLTest.ChildNR' does not have a public property named 'name'. R:\2007proj\PageDataBindDoesntSeemToWork\TstPageDataBind\TstDataBind.aspx 29
The ChildNR is not formed, just look in rendered HTML in browser
guenavan
Contributor
4306 Points
1695 Posts
Re: Page.DataBind() doesn't seem to work for Composite Controls
Feb 21, 2007 03:32 AM|LINK
<ChildNR runat="server" text=<%#"Hello"%> /> ,
then to beforementioned errors I get additional compilation errors
Error 1 The type name 'ChildNR' does not exist in the type WCLTest.ChildControlNR' e:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\tstpagedatabind\131a7dc2\74829726\App_Web_26kmhdyk.0.cs
If I add name element to it, then I get additionally
Error 3 Type 'WCLTest.ChildNR' does not have a public property named 'name'. R:\2007proj\PageDataBindDoesntSeemToWork\TstPageDataBind\TstDataBind.aspx 29
The ChildNR is not formed, just look in rendered HTML in browser
In order to correct this you may wish to look at [1], [2]
[1]
http://msdn2.microsoft.com/en-us/library/aa479016.aspx
Dino Esposito</div> <div class=title>A Crash Course on ASP.NET Control Development: Building Composite Controls</div> <div class=title>[2]
http://scottonwriting.net/sowblog/posts/2129.aspx</div> <div class=title>Scott Mitchell
Control Building and ViewState Lesson for the Day </div>