Tag is a property just like Text, so when adding nodes to the treeview you'd do something along the lines of :

Code:
NewNode.Text = RecordName
NewNode.Tag = RecordID
Then when you want to retrieve it the ID

Code:
RecordID = TreeView.SelectedNode.Tag