Re: Equivalent of Tag on Label

Brady Kelly <[email protected]> Fri, 27 Jul 2007 16:01:30 +0200
Newsgroups gmane.comp.windows.devel.dotnet.web
Organization Chase Software
Message-ID <[email protected]>
Thanks Mike, I'll look into that, but for now the easiest, if not most
elegant, solution was indeed to encode the metadata in the Name property.  I
was trying to solve a problem for somebody else, with minimal impact and
extra code.  I had already started thinking about using viewstate when I
discussed this with colleagues.

> -----Original Message-----
> From: Discussion of building .NET applications targeted for the Web
> [mailto:[email protected]] On Behalf Of Mike Andrews
> Sent: 27 July 2007 15:54 PM
> To: [email protected]
> Subject: Re: [DOTNET-WEB] Equivalent of Tag on Label
>
> For that task, I would recommend using either binary or xml
> serialization of
> your specific object(s) and storing them in viewstate for state
> management
> between postbacks.
> If you're already using session, that can be used as well, but if this
> is
> going to be a high volume website, I would not recommend using session
> unless you're using either a state server or SQL Server.
>
> I have a lot of sucess using XML serialization with objects to store
> state
> between postbacks.
>
> Thanks,
> Mike
>
>
> On 7/27/07, Brady Kelly <[email protected]> wrote:
> >
> > I WinForms Label control has a Tag property that can be used to store
> > metadata for the Label control.  An ASP.NET Label control does not
> have a
> > Tag property.  I was asking if there was any way of recreating the
> > functionality of the Tag property of a WinForms Label control but with
> an
> > ASP.NET Label control.
> >
> > It seems there isn't, short of encoding the metadata into the Name
> > property
> > of the Label control.  I specifically asked about the Label control
> trying
> > to avoid a custom, derived control.
> >
> >
> > > -----Original Message-----
> > > From: Discussion of building .NET applications targeted for the Web
> > > [mailto:[email protected]] On Behalf Of Mike Andrews
> > > Sent: 27 July 2007 14:52 PM
> > > To: [email protected]
> > > Subject: Re: [DOTNET-WEB] Equivalent of Tag on Label
> > >
> > > I'm not sure exactly as to what you are referring.
> > > To any custom object you can add a "Tag" object property to utilize
> such
> > > functionality.
> > > Also, just use the Tag property of the Label to do that or if you're
> > > using a
> > > control that doesn't have it and you need it, create an inherited
> > > control
> > > and add the property.
> > >
> > > Mike
> > >
> > > On 7/27/07, Brady Kelly <[email protected]> wrote:
> > > >
> > > > How could I emulate storing meta data for a Label control in its
> Tag
> > > > property, as with WinForms Label control?  I want to store a lot
> > > number
> > > > associated with a label on that label, so when I iterate a data
> > > > collection,
> > > > I can access data for a label by its 'tag' property.
> > > >
> > > >
> > > > ===================================
> > > > This list is hosted by DevelopMentor(r)  http://www.develop.com
> > > >
> > > > View archives and manage your subscription(s) at
> > > > http://discuss.develop.com
> > > >
> > >
> > > ===================================
> > > This list is hosted by DevelopMentorR  http://www.develop.com
> > >
> > > View archives and manage your subscription(s) at
> > > http://discuss.develop.com
> >
> > ===================================
> > This list is hosted by DevelopMentor(r)  http://www.develop.com
> >
> > View archives and manage your subscription(s) at
> > http://discuss.develop.com
> >
>
> ===================================
> This list is hosted by DevelopMentorR  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com