Question Should I use User.Identity.Name in Database tables

ping

Member
Joined
Jun 2, 2010
Messages
10
Programming Experience
3-5
Hi,
Please excuse my noobie ignorance...

I am creating an ASP.Net membership website with VB codebehind that will include a lot of data that is user specific, by that way I mean there will be loads of labels, images, etc that will show data that is specific to the currently logged in user.

What I have done so far (as example) is...
Database called DB1, Table called TBL1, columns UserName and TeamName
I have TBL1TableAdapter with GetTeamNameByUserName (SELECT teamname FROM TBL1 WHERE Username = @Username)
I use TableAdapter to .Insert(User.Identity.Name, TextBox.Text)
Then to call up the TeamName, I use TableAdapter.GetTeamNameByUserName(User.Identity.Name)

All works fine, but my question...
Is this an acceptable way of acheiving this? If not, what is a recommended way of acheiving this?
 
Back
Top