I've been working on webforms and per user data on ASP.NET where if a user logs in, they get their data.
I have a table where it takes the sqldatasource from an asp markup code:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:DefaultConnection %>"
ProviderName="<%$ ConnectionStrings:DefaultConnection.ProviderName %>"
SelectCommand="SELECT [first_name], [last_name], [weight_data] FROM [userData]
WHERE [email]='test@test.com';">
</asp:SqlDataSource>
I can get the currently logged in email string through <%: Context.User.Identity.GetUserName() %>
How would I put that into the WHERE email statement so I can take currently logged in user's email and replace it with 'test@test.com' to match it on the SQL table to get the other data?
Thanks a lot!