Could you please help me how to add the e-mail address of the logged user into a form field? From the user profile, the email address is stored there, I need to extract and dislplay the e-mail address in a form field. Something similar to the name of the user that is displayed next to the "Welcome" message.
I found something similar and i tested it by pasting it in the default.master, but i got an error that a block cant be used in that file.
<script type="text/c#" language="C#" runat="server">
protected void Page_Load(Object sender, EventArgs e)
{ LabelUserName.Text = Microsoft.SharePoint.SPContext.Current.Web.CurrentUser.Name;}</script>
<asp:Label ID="LabelUserName" runat="server"></asp:Label>
Thanks in advance.