Author: Tales from the Evil Empire : ASP.NET | Posted on: 7/10/2009 3:57:44 PM | Views : 856

In yesterday?s post , I published the code for a simple include method for ASP.NET that I?ve been using in a couple of places, only to realize that it was fine for what I was doing but probably not very useful beyond that. So I spent some time today broadening its scope. It now supports nested includes (I modified the original post to reflect that change) and also setting properties on the control. You can still do plain includes: <% this .Include( "contents.ascx" ); %> But now you can also set properties on the included user control using an anonymous object: <% this .Include( "contents.ascx" , new {number=2, what= "A" }); %> The code for the helper considerably grew along the way but it?s still reasonable...(read more) ...

Go to the complete details ...