D
Douglas
Hi all,
Here's a simplified example of my problem. I'm looking to have code
like this on an .aspx page:
<cc:Cameras runat="server">
<Camera Name="EOS 400D" />
<Camera Name="EOS 350D" />
</cc:Cameras>
And render HTML something like this:
<ul>
<li>EOS 400D</li>
<li>EOS 350D</li>
</ul>
I've defined a camera element CameraElement to represent each <Camera /
CameraElement objects into the list.
The best I have managed is this mangled property on Cameras:
public CameraElement Camera
{
set { cameras.Add(value); }
}
This seems suspect to me, and I can't find an example of how to do it
properly. How do I add the CameraElement objects to the List without
abusing a setter?
Thanks,
Douglas
Here's a simplified example of my problem. I'm looking to have code
like this on an .aspx page:
<cc:Cameras runat="server">
<Camera Name="EOS 400D" />
<Camera Name="EOS 350D" />
</cc:Cameras>
And render HTML something like this:
<ul>
<li>EOS 400D</li>
<li>EOS 350D</li>
</ul>
I've defined a camera element CameraElement to represent each <Camera /
manipulate the list. However, I don't know how to get theand a private List<CameraElement> cameras so that I can store and
CameraElement objects into the list.
The best I have managed is this mangled property on Cameras:
public CameraElement Camera
{
set { cameras.Add(value); }
}
This seems suspect to me, and I can't find an example of how to do it
properly. How do I add the CameraElement objects to the List without
abusing a setter?
Thanks,
Douglas