Error : Display Credentials

S

Sam

I would like to display username on web page via User.Identity.Name using MS
VisualStudio.Net 2003 but it is show nothing.

However, when I use Web Matrix, it show the username on web page.

What's wrong the coding or do I need settings at MS VisualStudio.Net 2003 ?

Coding
-------
<%@ import Namespace="System" %>
<%@ Page Language="vb" EnableViewState="false" EnableSessionState="false"
CodeBehind="main_menu.aspx.vb" AutoEventWireup="false"
Inherits="Purchasing.main_menu" %>

<script runat="server">

Sub Page_Load()
If User.Identity.IsAuthenticated Then
displayCredentials.Text = "User Login : <b>" &
User.Identity.Name.ToUpper() & "</b>"
End If
End Sub
</script>

VS.Net 2003 References
--------------------------
I had added the following at the solution :
- system
- system.configuration.install
- system.data
- system.drawing
- system.security
- system.web
- system.xml

Please help and advise.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top