Saturday, October 22, 2005

changing the value of an unknown datatype

use .GetType(); to find out what you're working with:
collection.items[0].GetType().ToString();

use this type to create a new variable:
TextBox myItem = new TextBox();

either add or reset the item into the collection:
collection.items[0] = myItem;
collection.items.add(myItem);

0 Comments:

Post a Comment

<< Home