I'm trying to load some specific information on a page depending on what logged in user loads the page. I did my best googling my problem but I couldn't find the solution.
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:werknem taken connection string %>"
SelectCommand="SELECT [Description], [State], [assessment] FROM [TaskInfo] WHERE ([EmployeeID] = @EmployeeID)">
<SelectParameters>
<asp:Parameter DefaultValue="" Name="@EmployeeID" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
And
Imports System.Data.SqlClient
Imports System.Data
Partial Class werknemer
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
SqlDataSource1.SelectParameters.Add("@EmployeeID", User.Identity.Name)
GridView1.DataBind()
End Sub
End Class
Some help would be greatly appreciated.