Loginstatus control in asp.net c# code

Posted by Rcsp under ASP.NET on 8/8/2013 | Points: 10 | Views : 1709 | Status : [Member] | Replies : 2
HI,

Need loginstatus control example with explanation using asp.net c# code

thanks




Responses

Posted by: Satyapriyanayak on: 8/8/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
LoginStatus Control Example: How to show login status in asp.net
Login.aspx

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>LoginStatus Control Example: How to show login status in asp.net</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2>My web site</h2>
<asp:Login ID="Login1" runat="server" BackColor="#FFFBD6" BorderColor="#FFDFAD"
BorderPadding="4" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana"
Font-Size="0.8em" ForeColor="#333333" TextLayout="TextOnTop">
<TextBoxStyle Font-Size="0.8em" />
<LoginButtonStyle BackColor="White" BorderColor="#CC9966" BorderStyle="Solid"
BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em"
ForeColor="#990000" />
<InstructionTextStyle Font-Italic="True" ForeColor="Black" />
<TitleTextStyle BackColor="#990000" Font-Bold="True" Font-Size="0.9em"
ForeColor="White" />
</asp:Login>
</div>
</form>
</body>
</html>

Default.aspx

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>LoginStatus control example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>Show Login Status</h1>
<asp:LoginStatus ID="LoginStatus1" runat="server" />
<br /><br />
<asp:LoginName ID="LoginName2" runat="server" FormatString="Hi {0}!" Font-Size="XX-Large" ForeColor="Crimson" />
</div>
</form>
</body>
</html>


www.c-sharpcorner.com/uploadfile/raj1979/login-status-control-in-Asp-Net-3-5/
http://asp-net-example.blogspot.in/2008/10/loginstatus-control-example-how-to-show.html

If this post helps you mark it as answer
Thanks

Rcsp, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response