In C# 3.0 ASP.NET I'm composing a CMS and I want to compose a SQL query that accesses my user identity.
In my master page I have a SqlDataSource
that I want to compose a SQL query that returns an ID from a table
EDIT
OK, look at this example: (this is in Page_Load
)
sqlDataSource1.SelectCommand = String.Format("select PageGroupID from users where Username = {0};", Page.User.Identity.Name);
But it doesn't work :(
Please help me!