Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button properties

Status
Not open for further replies.

skip2004

Programmer
Nov 9, 2004
37
GB
Hi,

In my VB.NET code I am programatically creating a number of buttons. With each button I would also like to store some additonal unique information (such as a DB record key), so when the button is pressed I can retrieve this and use in my code.

In ASP.NET it is possible to create addiotnal object attributes to do this kind of thing - is it possible on a VB.NET form? I don't seem to be able to find anything.

I would also like to store some additonal information with textboxes as well.

Many thanks,
skip2004
 
Well, if there's not a large amount of information you could use the Tag property to store a delimited list of the property values.

Or, you could subclass the button class and add your custom properties that way.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top