Re: Enumerated type in a custom control tag by Rex
Rex
Fri Jul 25 16:19:26 CDT 2008
On Jul 25, 1:30=A0pm, Rex the Strange <roger.m...@widgetinc.com> wrote:
> On Jul 25, 1:20=A0pm, Rex the Strange <roger.m...@widgetinc.com> wrote:
>
>
>
>
>
> > Hello all,
>
> > Can anyone please tell me why I can't do this (and what I can do to
> > get the equivalent effect):
>
> > In the code:
>
> > public enum myenum
> > =A0 value1
> > =A0 value2
> > end enum
>
> > In the aspx page:
>
> > <my:customcontrol runat=3D'server' id=3D'mycontrol' customvalue=3D'<
> > %=3Dmyenum.value1%>' />
>
> > Thanks,
>
> > rts
>
> Never mind. I figured it out. Use:
>
> <my:customcontrol runat=3D'server' id=3D'mycontrol' customvalue=3D'<% eva=
l
> (myenum.value1) %>' />
>
> Also, name sure you have an imports tag importing the required
> namespace (in my case):
>
> <%@ import namespace=3D'local.library' %>
>
> I hope that helps someone.
>
> rex- Hide quoted text -
>
> - Show quoted text -
Nope. That doesn't seem to work. The property is never being set. Any
ideas anyone?