Sponsored By
Advertise with Us
Advertisement
Advertise with Us
Follow Us
Article
Forum
Blog
Quiz
Beginner
Careers
Contact
Login
Email Id
Password
Remember Me
Forgot Password?
Sign Up
Home
|
Product
|
Services
|
About Us
|
Interview
|
DeveloperSection
|
Submit an Article
|
Submit Blog
Report Abuse Form
Reason:
Home
>>
.Net
>>
ASP.NET MVC
>>
Update the Login Control
Author
Post
ravi kumar
Total Post:
9
Member Since:
11/1/2011
Points:
47
Update the Login Control
Posted On:
11/1/2011 11:50:03 PM
Report Abuse
How to update the Login control to display Login user details once logged in successfully.i.e. once Login into the Login form Login control should be changed as Logoff control and diplay the Login username details
Reply
Author
Post
Rohit Kesharwani
Total Post:
54
Member Since:
8/8/2011
Points:
385
Re: Update the Login Control
Posted On:
11/2/2011 12:42:01 AM
Report Abuse
Hi,
You can create user control to change the login to logoff.
For eg.
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%
if (Request.IsAuthenticated) {
%>
Welcome <b><%: Page.User.Identity.Name %></b>!
[ <%: Html.ActionLink("Log Off", "LogOff", "Account") %> ]
<%
}
else {
%>
[ <%: Html.ActionLink("Log On", "LogOn", "Account") %> ]
<%
}
%>
You can also refer demo mvc application provided default in visual studio.
Reply
Report Abuse Form
Reason:
Total Online Users:
2687
Advertisement
Advertise with Us
Copyright ©
2009 - 2013
MindStick. All Rights Reserved.
Home
|
Contact Us
|
Services
|
Feedback
|
Advertisement
|
Privacy Policy
|
Term & Conditions
|
About Us