hello,
this is part of the code in my master page. the page show the top and the bottom part of the code, but the most important one is the middle one that need to capture the username or ID and show the button to log out. then this part of the code is not showing up on the top right of the web page.
i use the membership login template and connect the code below.
<div id="MainNav">
<div class="sitecontainer">
<div id="MainNavWrapper">
<asp:LoginView ID="LoginView1" runat="server">
<LoggedInTemplate>
|
Logged in as: <asp:LoginName ID="LoginName1" runat="server" />
|
<asp:Label ID="DividerLabel4" runat="server" Visible="true"> | </asp:Label>
<asp:LoginStatus ID="LoginStatus1" runat="server" LogoutAction="RedirectToLoginPage" />
|
</LoggedInTemplate>
</asp:LoginView>
</div>
</div>
</div>
please help and let me know if you need additional information to understand this part of code.
<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="Page.master.vb" Inherits="Membership_Provider.Page" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title></title>
<link href="~/Content/mainstyle.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder id="Parenthead" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
<!--CSUFHeader-->
<div id="CSUFHeader">
<div class="sitecontainer">
<div id="CSUFHeaderWrapper">
<div class="image-swap"> </div>
</div>
</div>
</div>
<!--CHHD+Dept Header-->
<div id="CHHDHeader">
<div class="sitecontainer">
<div id="CHHDHeaderWrapper">
<asp:Label ID="AppLabel" runat="server" CssClass="appname" />
<div id="deptname">
<%-- <table>
<tr>
<td><asp:Label ID="DeptName" runat="server" Text=" " Width ="250px"></asp:Label></td>
<td><asp:Label ID="Label30" runat="server" Text="Department"></asp:Label></td>
</tr>
</table>--%>
<%--<asp:HyperLink ID="DeptHyperLink" runat="server" NavigateUrl="#" Target="_blank">Department</asp:HyperLink><br />--%>
<asp:HyperLink ID="CollegeHyperLink" runat="server" NavigateUrl="http://hhd.fullerton.edu/" Target="_blank">College of Health and Human Development</asp:HyperLink>
</div>
</div>
</div>
</div>
<div id="MainNav">
<div class="sitecontainer">
<div id="MainNavWrapper">
<asp:LoginView ID="LoginView1" runat="server">
<LoggedInTemplate>
|
Logged in as: <asp:LoginName ID="LoginName1" runat="server" />
|
<asp:Label ID="DividerLabel4" runat="server" Visible="true"> | </asp:Label>
<asp:LoginStatus ID="LoginStatus1" runat="server" LogoutAction="RedirectToLoginPage" />
|
</LoggedInTemplate>
</asp:LoginView>
</div>
</div>
</div>
<!--Top Nav-->
<!--Main Contents with Footer-->
<div id="MainContents">
<div class="sitecontainer">
<div id="ContentWrapper">
<div id="ContentBody">
<asp:ContentPlaceHolder id="ParentContent" runat="server">
</asp:ContentPlaceHolder>
<p style="clear:both;"> </p>
</div>
<div id="Footer">
<div id="CSUFLogo">
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/MasterPages/_resources/images/CSUF_logo.png" PostBackUrl="http://www.fullerton.edu/" />
</div>
<div id="FooterText">
<p>©2019 College of Health and Human Development IT at Cal State Fullerton. If you encounter an error, please contact <a href="mailto:chhdit@fullerton.edu">chhdit@fullerton.edu</a> with a detailed description or screen shot of the error. We suggest using Internet Explorer, Firefox or Chrome web browsers to view this site.</p>
</div>
</div>
</div>
</div>
</div>
</form>
</body>
</html>
<%@ Page Title="Home Page" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.vb" Inherits="Membership_Provider._Default" %>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<asp:Login ID="Login1" runat="server" >
</asp:Login>