ASP.Net: User control with content area, it's clearly possible but I need some details.

Posted by bert on Stack Overflow See other posts from Stack Overflow or by bert
Published on 2010-04-27T09:21:38Z Indexed on 2010/04/27 9:23 UTC
Read the original article Hit count: 267

Filed under:
|
|

I have seen two suggestions for my original question about whether it is possible to define a content area inside a user control and there are some helpful suggestions i.e.

http://stackoverflow.com/questions/1971498/passing-in-content-to-asp-net-user-control

and

http://stackoverflow.com/questions/1912283/asp-net-user-control-inner-content

Now, I like the theory of the latter better than the former just for aesthetic reasons. It seems to make more sense to me but the example given uses two variables content and templateContent that the answerer has not defined in their example code. Without these details I have found that the example does not work. I guess they are properties of the control? Or some such?

The former example seems workable but I'd prefer to go with the latter if someone could fill in the blanks for me.

Thanks.

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET