Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 22, 2012 02:57 AM by teguhyuliantos
Member
129 Points
112 Posts
May 17, 2012 03:48 PM|LINK
Hello,
I am using C#, ASP.NET in my web application.
I have designed my web site like this.
In my default web page, I have my top company images & logos, menu bar and an iframe.
When the user clicks on a the menus, the requested page will be displayed in the iframe of the default page.
The default page almost works like a master page, but not actually a master page.
I want to implement security for my web site.
I have created a login page and everything is working fine.
Now the challenge now is:
I have put a login link on the top right corner of the default page, which is common for all the pages.
When the user logs into the website, the login link should change to logout.
So, I want to use loginstatus control,
Can anyone give me the code how to achieve this?
Thank you!
All-Star
21838 Points
4822 Posts
May 17, 2012 06:53 PM|LINK
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/login/loginstatus.aspx
May 18, 2012 07:54 PM|LINK
Hello Max,
Thanks for your response.
Actually, the URL that you have mentioned is good.
The tutorial uses the master page concept, but I don't want to do that, since I have a limitation, I don't have access to IIS on the Server,
I deploy my code by copying my files to a shared folder on the server.
I am using iframe to show all my web pages.
266 Points
154 Posts
May 19, 2012 01:07 PM|LINK
hi.....
you can use the login status as it is shown below:-
<asp:LoginView ID="LoginView1" runat="server"> <LoggedInTemplate> <asp:LoginStatus ID="LoginStatus1" runat="server" LogoutPageUrl="~/login.aspx" /> </LoggedInTemplate> </asp:LoginView>
Contributor
2252 Points
478 Posts
May 19, 2012 01:09 PM|LINK
try this
http://asp-net-example.blogspot.in/2008/10/loginstatus-control-example-how-to-show.html
http://www.c-sharpcorner.com/uploadfile/raj1979/login-status-control-in-Asp-Net-3-5/
42 Points
24 Posts
May 21, 2012 05:27 PM|LINK
Ya I think it works in any place. In divs, HTMl tables, top bars etc....
Participant
1370 Points
372 Posts
May 22, 2012 02:57 AM|LINK
To use loginstatus control, please refer the link below, hope will help your proble.
http://wiki.asp.net/page.aspx/409/loginstatus-control/
krishna.bb
Member
129 Points
112 Posts
How to use LoginStatus control
May 17, 2012 03:48 PM|LINK
Hello,
I am using C#, ASP.NET in my web application.
I have designed my web site like this.
In my default web page, I have my top company images & logos, menu bar and an iframe.
When the user clicks on a the menus, the requested page will be displayed in the iframe of the default page.
The default page almost works like a master page, but not actually a master page.
I want to implement security for my web site.
I have created a login page and everything is working fine.
Now the challenge now is:
I have put a login link on the top right corner of the default page, which is common for all the pages.
When the user logs into the website, the login link should change to logout.
So, I want to use loginstatus control,
Can anyone give me the code how to achieve this?
Thank you!
Krishna
bullpit
All-Star
21838 Points
4822 Posts
Re: How to use LoginStatus control
May 17, 2012 06:53 PM|LINK
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/login/loginstatus.aspx
Max
Let Me Google That For You!
krishna.bb
Member
129 Points
112 Posts
Re: How to use LoginStatus control
May 18, 2012 07:54 PM|LINK
Hello Max,
Thanks for your response.
Actually, the URL that you have mentioned is good.
The tutorial uses the master page concept, but I don't want to do that, since I have a limitation, I don't have access to IIS on the Server,
I deploy my code by copying my files to a shared folder on the server.
I am using iframe to show all my web pages.
Thank you!
Krishna
pradeepnt
Member
266 Points
154 Posts
Re: How to use LoginStatus control
May 19, 2012 01:07 PM|LINK
hi.....
you can use the login status as it is shown below:-
<asp:LoginView ID="LoginView1" runat="server"> <LoggedInTemplate> <asp:LoginStatus ID="LoginStatus1" runat="server" LogoutPageUrl="~/login.aspx" /> </LoggedInTemplate> </asp:LoginView>Pradeep Narayan
sunilgurjar
Contributor
2252 Points
478 Posts
Re: How to use LoginStatus control
May 19, 2012 01:09 PM|LINK
try this
http://asp-net-example.blogspot.in/2008/10/loginstatus-control-example-how-to-show.html
http://www.c-sharpcorner.com/uploadfile/raj1979/login-status-control-in-Asp-Net-3-5/
read my blog
http://sunilgurjar.blogspot.com/
venugopaldik...
Member
42 Points
24 Posts
Re: How to use LoginStatus control
May 21, 2012 05:27 PM|LINK
Ya I think it works in any place. In divs, HTMl tables, top bars etc....
India.
teguhyuliant...
Participant
1370 Points
372 Posts
Re: How to use LoginStatus control
May 22, 2012 02:57 AM|LINK
To use loginstatus control, please refer the link below, hope will help your proble.
http://wiki.asp.net/page.aspx/409/loginstatus-control/