I have a website that uses the built in login control in visual studios 2010. I have a page that updates data in my database (all this works fine). I now want to add the username of the person currently logged in to the row that they are updating. How do I do this?
Here is my update command from my SQLDataSource:
UpdateCommand="UPDATE dbo.Sales_Orders SET UPC=@UPC,Product_Description=@Product_Description,Product_Quantity=@Product_Quantity,
Product_Unit=@Product_Unit,Product_Price=@Product_Price,Comment=@Comment, LastUpdated=getdate(), UserUpdate=???? WHERE Sales_Order_ID=@Sales_Order_ID"
You can see that the last column is UserUpdate=???? How do I make it set this to the current user logged in?
Thanks for the help!