I'm wondering how to access the username of the current user login on the site, i want to bind that value in my datalist. I'm using the default ASPNETDB database. When you are doing it in C# code you can just write `
User.Identity.Name
But how do i access it in ASP code?
Edit: just want to clear up it's for the parameter to the binding i need the username.
You should take a look at Introduction to ASP.NET inline expressions in the .NET Framework
The embedded code block is used to execute programming statements and call functions in the current page class during the page-rendering phase.
<% ... %> embedded code blocks syntax
In this instance to show the username put User.Identity.Name
within a code block on your page like so.
<%# System.Web.HttpContext.User.Identity.Name %>