I have created a login page and everything works fine. Now I want to do a select in a GridView based on the userid matching Context.User.Identity.Name. I've tried every way I can think of to create the select and most of the times I get an error - 'the server tag is not well formed'. I've tried many combinations of the following:
SelectCommand="SELECT [EmpName] FROM [Expenses] WHERE [UserName]= '" + currentUserID + "'"
or
SelectCommand="SELECT [EmpName] FROM [Expenses] WHERE [UserName]= '" + Context.User.Identity.Name + "'"
If I actually put a username in, it works fine. Any help would be appreciated.
Thanks
SelectCommand="SELECT [EmpName] FROM [Expenses] WHERE [UserName]= '" + currentUserID + "'"
or
SelectCommand="SELECT [EmpName] FROM [Expenses] WHERE [UserName]= '" + Context.User.Identity.Name + "'"
If I actually put a username in, it works fine. Any help would be appreciated.
Thanks