In very brief terms, what I need to achieve is to replace a hardcoded 'Name' and 'Email' that are displayed in a webpage for the 'Name' and 'Email' of the current logged in user.
I currently have 2 files for 1 ASP.NET webpage (".aspx" page and ".aspx.cs" code behind file).
In my ".aspx" file I have the following code:
<div class="firmaMail" id="firmaMaildicom">
<b>John Anibal Smith</b><br />
Team Lead<br /><br />
THE A TEAM<br />
Telephone: 1 800 1234567<br />
Mobile: 1 900 9876543<br />
Mail: Anibal@ateam.com<br />
Web: www.ateam.com<br />
<asp:LinkButton ID="sendMailDicom" runat="server" ><div class="button_submit" onclick="AvisoMailDicom()">Send Email</div></asp:LinkButton>
In part of my "code behind" ".aspx.cs" file I have a working code to get the 'Email' of the current logged in user. Maybe this can work but I don't know how to use it (or call it) in the aspx file:
string email = Request.Form["email"];
Now, if that is not possible... Is it possible to use/get both variables I need directly in the "aspx" file without calling the "aspx.cs" file?