summaryrefslogtreecommitdiffstats
path: root/projecttemplates/MvcRelyingParty/Views/Shared/LogOnUserControl.ascx
diff options
context:
space:
mode:
Diffstat (limited to 'projecttemplates/MvcRelyingParty/Views/Shared/LogOnUserControl.ascx')
-rw-r--r--projecttemplates/MvcRelyingParty/Views/Shared/LogOnUserControl.ascx14
1 files changed, 14 insertions, 0 deletions
diff --git a/projecttemplates/MvcRelyingParty/Views/Shared/LogOnUserControl.ascx b/projecttemplates/MvcRelyingParty/Views/Shared/LogOnUserControl.ascx
new file mode 100644
index 0000000..0e7120e
--- /dev/null
+++ b/projecttemplates/MvcRelyingParty/Views/Shared/LogOnUserControl.ascx
@@ -0,0 +1,14 @@
+<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
+<%
+ if (Request.IsAuthenticated) {
+%>
+ Welcome <b><%= Html.Encode(Page.User.Identity.Name) %></b>!
+ [ <%= Html.ActionLink("Log Off", "LogOff", "Account") %> ]
+<%
+ }
+ else {
+%>
+ [ <%= Html.ActionLink("Log On", "LogOn", "Account") %> ]
+<%
+ }
+%>