I dont see how this working, with every new request you are losing the
attr.values...
In winforms the label stays alive during the timespan of the app. In
asp.net its created and destroyed for each request.
// Ryan
2007/7/28, Brady Kelly <***@chasesoftware.co.za>:
> That's what's nice about attributes on web controls. Makes me think of
> better using the Tag property on WinForms controls by storing an attributes
> dictionary in it.
>
> > -----Original Message-----
> > From: Discussion of building .NET applications targeted for the Web
> > [mailto:DOTNET-***@DISCUSS.DEVELOP.COM] On Behalf Of Pardee, Roy
> > Sent: 27 July 2007 22:44 PM
> > To: DOTNET-***@DISCUSS.DEVELOP.COM
> > Subject: Re: [DOTNET-WEB] Equivalent of Tag on Label
> >
> > And give your attribute a better name than 'Tag'. ;-)
> >
> > -----Original Message-----
> > From: Discussion of building .NET applications targeted for the Web
> > [mailto:DOTNET-***@DISCUSS.DEVELOP.COM] On Behalf Of Brady Kelly
> > Sent: Friday, July 27, 2007 7:22 AM
> > To: DOTNET-***@DISCUSS.DEVELOP.COM
> > Subject: Re: [DOTNET-WEB] Equivalent of Tag on Label
> >
> > It seems the attributes collection is the way to go. Thanks to all that
> > responded.
> >
> > > -----Original Message-----
> > > From: Discussion of building .NET applications targeted for the Web
> > > [mailto:DOTNET-***@DISCUSS.DEVELOP.COM] On Behalf Of Mike Andrews
> > > Sent: 27 July 2007 16:15 PM
> > > To: DOTNET-***@DISCUSS.DEVELOP.COM
> > > Subject: Re: [DOTNET-WEB] Equivalent of Tag on Label
> > >
> > > I would recommend if you use the attributes collection of the control
> > > to keep your data small.
> > >
> > > On 7/27/07, Adrian Martin <***@ypn.co.uk> wrote:
> > > >
> > > > Add you data via the Attribute collection
> > > >
> > > >
> > > > yourLabel.Attributes["tag"] = "stringdata" ;
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Discussion of building .NET applications targeted for the Web
> > > > [mailto:DOTNET-***@DISCUSS.DEVELOP.COM] On Behalf Of Brady Kelly
> > > > Sent: 27 July 2007 09:11
> > > > To: DOTNET-***@DISCUSS.DEVELOP.COM
> > > > Subject: Equivalent of Tag on Label
> > > >
> > > > 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
> > > >
> > > >
> > > > Johnston Press plc Registered in Scotland no.
> > > > SC015382 Registered Office: 53 Manor Place, Edinburgh, EH3
> > 7EG
> > > >
> > > > Opinions expressed in this email are those of the writer and not the
> >
> > > > company. E-mail traffic is monitored within Johnston Press and
> > > messages may
> > > > be viewed. This e-mail and any files with it are solely for the use
> > > of the
> > > > addressee(s). If you are not the intended recipient, you have
> > > received this
> > > > e-mail in error. Please delete it or return it to the sender or
> > > notify us
> > > > by email at ***@jpress.co.uk
> > > >
> > > > ===================================
> > > > 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 DevelopMentor. 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 DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com