Re: Equivalent of Tag on Label
Mike Andrews <[email protected]> Fri, 27 Jul 2007 08:54:17 -0500
| Newsgroups | gmane.comp.windows.devel.dotnet.web |
|---|---|
| Message-ID | <[email protected]> |
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 DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com