Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ListItems in Composite Controls

0 views
Skip to first unread message

R. Groves

unread,
Apr 23, 2002, 11:31:56 AM4/23/02
to
I'm trying to create a Composite Control with a RadioButtonList. When
I expose the ListItemsCollection as a property, I am able to edit the
items just fine through VS.NET.

However, the generated HTML/ASPX is incorrect:

<cc1:Radio id="Radio1" runat="server" text=""
items="(Collection)"></cc1:Radio>

Where "items" should be broken out:

<asp:RadioButtonList id="RadioButtonList1" runat="server">
<asp:ListItem Value="1">1</asp:ListItem>
<asp:ListItem Value="2">2</asp:ListItem>
<asp:ListItem Value="3">3</asp:ListItem>
</asp:RadioButtonList >


I need to do this as a Composite Control, so I can't just simply
inherit RadioButtonList. How do I force a propery to be broken out in
the generated ASPX?

Victor Garcia Aprea

unread,
Apr 23, 2002, 11:34:21 AM4/23/02
to
Take a look at the PersistenceMode attribute,

-Victor.

--
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.


"R. Groves" <r.gr...@usa.net> wrote in message
news:914e97ae.02042...@posting.google.com...

R. Groves

unread,
Apr 23, 2002, 3:07:34 PM4/23/02
to
Thanks Victor. I applied PersistenceMode, but for some reason the first tag
is missing from the first element in the list:

<cc1:Radio id="Radio1" runat="server">1344</ASP:LISTITEM>
<ASP:LISTITEM Value="5678">5678</ASP:LISTITEM>
</cc1:Radio>


I get a "Specified cast is not valid" when attempting to run the
application.


-Rory


"Victor Garcia Aprea" <v...@NOobiesSPAM.com> wrote in message
news:e2Pkpwt6BHA.2152@tkmsftngp02...

Victor Garcia Aprea

unread,
Apr 24, 2002, 12:44:25 PM4/24/02
to
Thats really weird, can you post the sourcecode for your control and the
aspx page so others may try to repro the issue?

--
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.


"R. Groves" <rory@-no_spam-grovesinternet.com> wrote in message
news:eG5#4nv6BHA.1668@tkmsftngp03...

0 new messages