I am tring to create a login in control that can be generated into a dll to be used on the toolbox. However I am having issues when I try to add a reference to the dll that the login control generated. Can someone tell me what I seem to be missing. I get the following error when I link to the dll "There are no components in LoginControl.dll that can be placed on the toolbox"
<Assembly: WebResource("LoginControl.cancel.jpg", "image/jpeg")>
<Assembly: WebResource("LoginControl.change.jpg", "image/jpeg")>
<Assembly: WebResource("LoginControl.close.jpg", "image/jpeg")>
<Assembly: WebResource("LoginControl.downArrow.jpg", "image/jpeg")>
<Assembly: WebResource("LoginControl.find.jpg", "image/jpeg")>
<Assembly: WebResource("LoginControl.login.jpg", "image/jpeg")>
<Assembly: WebResource("LoginControl.next.jpg", "image/jpeg")>
''' <summary>
''' this control has a login control
''' a password recovery control
''' a change password control
''' a change username control
''' and a username recovery
'''
''' </summary>
''' <remarks></remarks>
'''
Partial Public Class ucLogin
Inherits System.Web.UI.UserControl
'variables for login control
Private _destinationPageUrl As String
Private _rememberMeSet As Boolean
'Panel variables
Private _loginPanelCss As String
Private _signInLabel As String
Private _loginPanelWidth As Integer
'image button URL's variables
Private _cancelBtnImageURL As String
Private _signInBtnImageURL As String
Private _nextBtnImageURL As String
Private _findBtnImageURL As String
Private _closeBtnImageURL As String
Private _changeBtnImageURL As String
Private _logoutDestinationURL As String
' css for controls
Private _controlCSS As String
Private _controlHeaderCss As String
'email texts
Private _chngPassEmailURL As String
Private _passRecEmailURL As String
' to get to the controls on the page
Dim _loginContainer As Object
Dim _passRecUserContainer As Object
Dim _passRecQuesContainer As Object
Dim _passRecSuccContainer As Object
Dim _chngPassContainer As Object
Dim _chngPassSuccContainer As Object
'password expire variables
Private _passwordExpire As Integer = 0
Private _membershipUser As MembershipUser = Membership.GetUser(HttpContext.Current.User.Identity.Name)
Private _commentExpireDate As Date
#Region "Public Variables"
Public Property DestinationPageUrl() As String
Get
Return _destinationPageUrl
End Get
Set(ByVal value As String)
_destinationPageUrl = value
End Set
End Property
Public Property RememberMeSet() As Boolean
Get
Return _rememberMeSet
End Get
Set(ByVal value As Boolean)
_rememberMeSet = value
End Set
End Property
Public Property LoginPanelCss() As String
Get
Return _loginPanelCss
End Get
Set(ByVal value As String)
_loginPanelCss = value
End Set
End Property
Public Property SignInLabel() As String
Get
Return _signInLabel
End Get
Set(ByVal value As String)
_signInLabel = value
End Set
End Property
Public Property LoginPanelWidth() As Integer
Get
Return _loginPanelWidth
End Get
Set(ByVal value As Integer)
_loginPanelWidth = value
End Set
End Property
Public Property PasswordExpire() As Integer
Get
Return _passwordExpire
End Get
Set(ByVal value As Integer)
_passwordExpire = value
End Set
End Property
Public Property ChngPassEmailURL() As String
Get
Return _chngPassEmailURL
End Get
Set(ByVal value As String)
_chngPassEmailURL = value
End Set
End Property
Public Property PassRecEmailURL() As String
Get
Return _passRecEmailURL
End Get
Set(ByVal value As String)
_passRecEmailURL = value
End Set
End Property
Public Property LogoutDestinationURL() As String
Get
Return _logoutDestinationURL
End Get
Set(ByVal value As String)
_logoutDestinationURL = value
End Set
End Property
Public Property ControlCSS() As String
Get
Return _controlCSS
End Get
Set(ByVal value As String)
_controlCSS = value
If (_controlCSS Is String.Empty) Then
Dim includeTemplate As String = "<link rel='stylesheet' text='text/css' href='{0}' />"
Dim includeLocation As String = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "LoginControl.Login.css")
lgLogin.CssClass = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "LoginControl.Login.css")
prPassRecovery.CssClass = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "LoginControl.Login.css")
chngPassword.CssClass = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "LoginControl.Login.css")
pnUsrRecovery.CssClass = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "LoginControl.Login.css")
pnChangeUser.CssClass = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "LoginControl.Login.css")
End If
lgLogin.CssClass = _controlCSS
prPassRecovery.CssClass = _controlCSS
chngPassword.CssClass = _controlCSS
pnUsrRecovery.CssClass = _controlCSS
pnChangeUser.CssClass = _controlCSS
End Set
End Property
Public Property ControlHeaderCss() As String
Get
Return _controlHeaderCss
End Get
Set(ByVal value As String)
_controlHeaderCss = value
Dim _loginContainer As Object = lgLogin.Controls(0)
Dim _passRecUserContainer = prPassRecovery.Controls(0)
Dim _passRecQuesContainer = prPassRecovery.Controls(1)
Dim _passRecSuccContainer = prPassRecovery.Controls(2)
Dim _chngPassContainer As Object = chngPassword.Controls(0)
Dim _chngPassSuccContainer As Object = chngPassword.Controls(1)
Dim _lgCtrlHeader As Label = CType(_loginContainer.FindControl("lblLoginHeader"), Label)
Dim _passRecUserCtrlHeader As Label = CType(_passRecUserContainer.FindControl("lblPassRecUserCtrlHeader"), Label)
Dim _passRecQuestCtrlHeader As Label = CType(_passRecQuesContainer.FindControl("lblPassRecQuestHeader"), Label)
Dim _passRecSuccCtrlHeader As Label = CType(_passRecSuccContainer.FindControl("lblPassRecSuccHeader"), Label)
Dim _passChngCtrlHeader As Label = CType(_chngPassContainer.FindControl("lblChgPassCtrlHeader"), Label)
Dim _passChngSuccCtrlHeader As Label = CType(_chngPassSuccContainer.FindControl("lblChgPassSuccCtrlHeader"), Label)
Dim _usrRecoverCtrlHeader As Label = CType(vwUserRecovery.FindControl("lblUsrRecHeader"), Label)
Dim _chgUserNameCtrlHeader As Label = CType(vwChangeUserName.FindControl("lblChgUserCtrlHeader"), Label)
If (_controlHeaderCss Is String.Empty) Then
_lgCtrlHeader.CssClass = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "LoginControl.Login.css") _passRecUserCtrlHeader.CssClass = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "LoginControl.Login.css")
_passRecQuestCtrlHeader.CssClass = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "LoginControl.Login.css")
_passRecSuccCtrlHeader.CssClass = Page.ClientScript.GetWebResourceUrl(Me.GetType(), LoginControl.Login.css") _passChngCtrlHeader.CssClass = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "LoginControl.Login.css")
_usrRecoverContorl.CssClass =Page.ClientScript.GetWebResourceUrl(Me.GetType(), "LoginControl.Login.css")
Else
_lgCtrlHeader.CssClass = _controlHeaderCss
_passRecUserCtrlHeader.CssClass = _controlHeaderCss
_passRecQuestCtrlHeader.CssClass = _controlHeaderCss
_passRecSuccCtrlHeader.CssClass = _controlHeaderCss
_passChngCtrlHeader.CssClass = _controlHeaderCss
_passChngSuccCtrlHeader.CssClass = _controlHeaderCss
_usrRecoverCtrlHeader.CssClass = _controlHeaderCss
_chgUserNameCtrlHeader.CssClass = _controlHeaderCss
End If
End Set
End Property
Public Property CancelBtnImageURL() As String
Get
Return _cancelBtnImageURL
End Get
Set(ByVal value As String)
_cancelBtnImageURL = value
_loginContainer = lgLogin.Controls(0)
_chngPassContainer = chngPassword.Controls(0)
Dim _loginCancelBtn As ImageButton = CType(_loginContainer.FindControl("btnLoginCancel"), ImageButton)
Dim _chngPassCancelBtn As ImageButton = CType(_chngPassContainer.FindControl("chngPassCancelBtn"), ImageButton)
Dim _userChangeNameCancelBtn As ImageButton = CType(vwChangeUserName.FindControl("chgUserNameCancelBtn"), ImageButton)
If (_cancelBtnImageURL Is String.Empty) Then
_loginCancelBtn.ImageUrl = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "cancel.jpg")
_chngPassCancelBtn.ImageUrl = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "cancel.jpg")
_userChangeNameCancelBtn.ImageUrl = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "cancel.jpg")
Else
_loginCancelBtn.ImageUrl = _cancelBtnImageURL
_chngPassCancelBtn.ImageUrl = _cancelBtnImageURL
_userChangeNameCancelBtn.ImageUrl = _cancelBtnImageURL
End If
End Set
End Property
Public Property SignInBtnImageURL() As String
Get
Return _signInBtnImageURL
End Get
Set(ByVal value As String)
_signInBtnImageURL = value
_loginContainer = lgLogin.Controls(0)
Dim _loginBtn As ImageButton = CType(_loginContainer.FindControl("LoginButton"), ImageButton)
If (_signInBtnImageURL Is String.Empty) Then
_loginBtn.ImageUrl = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "login.jpg")
Else
_loginBtn.ImageUrl = _signInBtnImageURL
End If
End Set
End Property
Public Property NextBtnImageURL() As String
Get
Return _nextBtnImageURL
End Get
Set(ByVal value As String)
_nextBtnImageURL = value
_passRecUserContainer = prPassRecovery.Controls(0)
_passRecQuesContainer = prPassRecovery.Controls(1)
Dim _passRecUserBtn As ImageButton = CType(_passRecUserContainer.FindControl("PassRecUserNameBtn"), ImageButton)
Dim _passRecQuestBtn As ImageButton = CType(_passRecQuesContainer.FindControl("PassRecQuestionBtn"), ImageButton)
If (_nextBtnImageURL Is String.Empty) Then
_passRecUserBtn.ImageUrl = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "next.jpg")
_passRecQuestBtn.ImageUrl = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "next.jpg")
Else
_passRecUserBtn.ImageUrl = _nextBtnImageURL
_passRecQuestBtn.ImageUrl = _nextBtnImageURL
End If
End Set
End Property
Public Property CloseBtnImageURL() As String
Get
Return _closeBtnImageURL
End Get
Set(ByVal value As String)
_closeBtnImageURL = value
_passRecSuccContainer = prPassRecovery.Controls(2)
_chngPassSuccContainer = chngPassword.Controls(1)
Dim _passRecCloseBtn As ImageButton = CType(_passRecSuccContainer.FindControl("PassRecCloseBtn"), ImageButton)
Dim _chngPassCloseBtn As ImageButton = CType(_chngPassSuccContainer.FindControl("chgPasswordCloseBtn"), ImageButton)
If (_closeBtnImageURL Is String.Empty) Then
_passRecCloseBtn.ImageUrl = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "close.jpg")
_chngPassCloseBtn.ImageUrl = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "close.jpg")
Else
_passRecCloseBtn.ImageUrl = _closeBtnImageURL
_chngPassCloseBtn.ImageUrl = _closeBtnImageURL
End If
End Set
End Property
Public Property FindBtnImageURL() As String
Get
Return _findBtnImageURL
End Get
Set(ByVal value As String)
_findBtnImageURL = value
Dim _userRecovery As ImageButton = CType(vwUserRecovery.FindControl("UsrRecFindBtn"), ImageButton)
If (_findBtnImageURL Is String.Empty) Then
_userRecovery.ImageUrl = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "find.jpg")
Else
_userRecovery.ImageUrl = _findBtnImageURL
End If
End Set
End Property
Public Property ChangeBtnImageURL() As String
Get
Return _changeBtnImageURL
End Get
Set(ByVal value As String)
_changeBtnImageURL = value
'need because change password is in a template
Dim _chngPassContainer As Object = chngPassword.Controls(0)
Dim _chngPassBtn As ImageButton = CType(_chngPassContainer.FindControl("chngPassBtn"), ImageButton)
'to get to the change name image button
Dim _userChangeNameBtn As ImageButton = CType(vwChangeUserName.FindControl("chgUserNameBtn"), ImageButton)
If (_changeBtnImageURL Is String.Empty) Then
_chngPassBtn.ImageUrl = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "change.jpg")
_userChangeNameBtn.ImageUrl = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "change.jpg")
Else
_chngPassBtn.ImageUrl = _changeBtnImageURL
_userChangeNameBtn.ImageUrl = _changeBtnImageURL
End If
End Set
End Property
#End Region
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
setupForm()
Dim cssResource As String = "LoginControl.Login.css"
Dim cssURL As String = Page.ClientScript.GetWebResourceUrl(Me.GetType(), cssResource)
Dim cssLink As HtmlLink = New HtmlLink()
cssLink.Href = cssResource
cssLink.Attributes.Add("rel", "stylesheet")
Me.Page.Header.Controls.Add(cssLink)
If (Page.IsPostBack) Then
If Not HttpContext.Current.Request.IsAuthenticated Then
End If
End If
If (Not Page.IsPostBack) Then
If HttpContext.Current.Request.IsAuthenticated Then
mvLoginBtn_Status.SetActiveView(vwLogout)
Else
mvLoginBtn_Status.SetActiveView(vwSignIn)
End If
End If
End Sub
Private Sub setupForm()
' to get to the controls on the page
Dim _chngPassEmail As ChangePassword = CType(vwChangePassword.FindControl("chngPassword"), ChangePassword)
Dim _passRecEmail As PasswordRecovery = CType(vwPassRecovery.FindControl("prPassRecovery"), PasswordRecovery)
'set email URLs
_chngPassEmail.MailDefinition.BodyFileName = _chngPassEmailURL
_passRecEmail.MailDefinition.BodyFileName = _passRecEmailURL
lgStatus.LogoutPageUrl = _logoutDestinationURL
' set panel properties
lblSignIn.Text = _signInLabel
pnSignIn.CssClass = _loginPanelCss
' set the Login control properties
lgLogin.DestinationPageUrl = _destinationPageUrl
lgLogin.RememberMeSet = _rememberMeSet
End Sub
''' <summary>
''' this method checks to see if the users password has expired (Membership.Comment).
''' this will force the user to change their password
''' </summary>
Private Sub lgLogin_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles lgLogin.Load
' verify if password is expired
If HttpContext.Current.Request.IsAuthenticated Then
If Not (_membershipUser.Comment = String.Empty) Then
If Date.TryParse(_membershipUser.Comment, _commentExpireDate) Then
If _commentExpireDate < Date.Today Then
mvLogin_PassRecovery.SetActiveView(vwChangePassword)
pnLoginControls.Style("display") = "inline"
End If
End If
End If
End If
End Sub
Protected Sub lbPassRecovery_Click(ByVal sender As Object, ByVal e As EventArgs)
'set view that has the password recovery control
mvLogin_PassRecovery.SetActiveView(vwPassRecovery)
pnLoginControls.Style("display") = "inline"
End Sub
Protected Sub SubmitButton_Click(ByVal sender As Object, ByVal e As EventArgs)
'set view that has the password recovery control
mvLogin_PassRecovery.SetActiveView(vwPassRecovery)
pnLoginControls.Style("display") = "inline"
End Sub
Protected Sub lbChangePass_Click(ByVal sender As Object, ByVal e As EventArgs) Handles lbChangePass.Click
'set view that has the change password control
mvLogin_PassRecovery.SetActiveView(vwChangePassword)
pnLoginControls.Style("display") = "inline"
End Sub
Protected Sub lbChangeUser_Click(ByVal sender As Object, ByVal e As EventArgs) Handles lbChangeUser.Click
'set user in the change user table
lblOriginalUser.Text = " " + HttpContext.Current.User.Identity.Name
'set view that has the change user table
mvLogin_PassRecovery.SetActiveView(vwChangeUserName)
pnLoginControls.Style("display") = "inline"
End Sub
Protected Sub lbUserNameRecovery_Click(ByVal sender As Object, ByVal e As EventArgs)
'set view that has the user recovery table
mvLogin_PassRecovery.SetActiveView(vwUserRecovery)
pnLoginControls.Style("display") = "inline"
End Sub
Private Sub prPassRecovery_SendingMail(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MailMessageEventArgs) Handles prPassRecovery.SendingMail
_membershipUser = Membership.GetUser(prPassRecovery.UserName)
' logic to force user to change password
_membershipUser.Comment = DateAdd(DateInterval.Day, -1, Date.Today)
Membership.UpdateUser(_membershipUser)
End Sub
''' <summary>
''' this method checks the following:
''' Is Membership comment empty(_commentExpireDate)
''' Is there a property for expired password
''' if Membership comment is not empty check to see if we have a property for expire password
''' if so set the new password expiration date
''' if no expired password property set the comment to null
''' </summary>
Private Sub ChangePassword1_ContinueButtonClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles chngPassword.ContinueButtonClick
If Not (_membershipUser.Comment = String.Empty) Then
If Not _passwordExpire = 0 Then
If DateDiff("Day", _commentExpireDate, Date.Today) < 0 Then
_membershipUser.Comment = DateAdd(DateInterval.Day, _passwordExpire, Date.Today)
Membership.UpdateUser(_membershipUser)
End If
Else
_membershipUser.Comment = String.Empty
Membership.UpdateUser(_membershipUser)
End If
End If
' close panel
pnLoginControls.Style("display") = "none"
End Sub
Private Sub btSignIn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btSignIn.Click
'set view that has the login control
mvLogin_PassRecovery.SetActiveView(vwLogin)
pnLoginControls.Style("display") = "inline"
End Sub
Protected Sub cancelLoginButton(ByVal sender As Object, ByVal e As System.EventArgs)
pnLoginControls.Style("display") = "none"
End Sub
Protected Sub ClosePasswordSent(ByVal sender As Object, ByVal e As System.EventArgs)
pnLoginControls.Style("display") = "none"
End Sub
Private Sub chgUserNameCancelBtn_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles chgUserNameCancelBtn.Click
pnLoginControls.Style("display") = "none"
End Sub
Private Sub chgUserNameBtn_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles chgUserNameBtn.Click
'TODO* logic to change the username and send email to them that it changed
End Sub
Private Sub usrRecFindBtn_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles usrRecFindBtn.Click
'TODO* logic to find username and email them their username
' also when name is found place name into the login box
End Sub
Protected Sub CloseChangePassword(ByVal sender As Object, ByVal e As System.EventArgs)
pnLoginControls.Style("display") = "none"
End Sub
End Class
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="ucLogin.ascx.vb" Inherits="ucLogin" %>
<asp:MultiView ID="mvLoginBtn_Status" runat="server">
<asp:View ID="vwSignIn" runat="server">
<asp:Panel ID="pnSignIn" runat="server">
<div>
<asp:Label ID="lblSignIn" runat="server" Text=""></asp:Label>
<asp:LinkButton ID="btSignIn" runat="server">Sign In</asp:LinkButton>
<asp:Image ID="imgArrow" runat="server" ImageUrl="downArrow.jpg" ToolTip="Sign In" />
</div>
</asp:Panel>
</asp:View>
<asp:View ID="vwLogout" runat="server">
<asp:LoginStatus ID="lgStatus" runat="server" />
<asp:LoginName ID="logName" runat="server" />
<br />
<asp:LinkButton ID="lbChangePass" runat="server" Font-Size="X-Small" Font-Underline="False"
ForeColor="Red">Change Password</asp:LinkButton>
<br />
<asp:LinkButton ID="lbChangeUser" runat="server" Font-Size="X-Small" Font-Underline="False"
ForeColor="#FF3300">Change Username</asp:LinkButton>
</asp:View>
</asp:MultiView>
<asp:Panel ID="pnLoginControls" runat="server" Style="display: none;">
<asp:MultiView ID="mvLogin_PassRecovery" runat="server" ActiveViewIndex="0">
<%-- -------- Login ----------- --%>
<asp:View ID="vwLogin" runat="server">
<asp:Login ID="lgLogin" runat="server" VisibleWhenLoggedIn="False" CssClass="loginCtrlHeader">
<LayoutTemplate>
<table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse;"
width="100%">
<tr>
<td align="center" colspan="2" id="lgCtrlHeader" runat="server">
<asp:Label ID="lblLoginHeader" runat="server" Text="Log In" Width="100%"></asp:Label>
</td>
</tr>
<tr >
<td align="left" style="padding-left: 5px;">
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" Font-Size="XX-Small">User Name:</asp:Label>
</td>
<td style="padding-top:5px;">
<asp:TextBox ID="UserName" runat="server" Width="150px"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="ctl00$lgLogin">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr >
<td align="left" style="padding-left: 5px;">
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" Font-Size="XX-Small">Password:</asp:Label>
</td>
<td>
<asp:TextBox ID="Password" runat="server" TextMode="Password" Width="150px"></asp:TextBox>
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="ctl00$lgLogin">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr style="padding-left: 5px;">
<td colspan="2">
<asp:CheckBox ID="RememberMe" runat="server" Font-Size="XX-Small" Text="Remember me" />
</td>
</tr>
<tr>
<td align="center" colspan="2" style="color: Red;">
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
<tr align="center">
<td colspan="2">
<asp:ImageButton ID="LoginButton" runat="server" CommandName="Login" ValidationGroup="ctl00$lgLogin" />
<asp:ImageButton ID="btnLoginCancel" runat="server" OnClick="cancelLoginButton" />
</td>
</tr>
<tr >
<td colspan="2" style="padding-left: 5px; padding-top:5px;">
<asp:LinkButton ID="lbPassRecovery" runat="server" Font-Size="XX-Small" OnClick="lbPassRecovery_Click">Forget your password?</asp:LinkButton>
</td>
</tr>
<tr >
<td colspan="2" style="padding-left: 5px; padding-bottom: 10px;">
<asp:LinkButton ID="LinkButton2" runat="server" Font-Size="XX-Small" OnClick="lbUserNameRecovery_Click">Forget your username?</asp:LinkButton>
</td>
</tr>
</table>
</LayoutTemplate>
</asp:Login>
</asp:View>
<%-- -------- Password Recovery ----------- --%>
<asp:View ID="vwPassRecovery" runat="server">
<asp:PasswordRecovery ID="prPassRecovery" runat="server" CssClass="loginCtrlHeader">
<MailDefinition BodyFileName="~/EmailTemplates/PasswordRecovery.txt">
</MailDefinition>
<UserNameTemplate>
<table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse;"
width="100%">
<tr>
<td align="center" colspan="2">
<asp:Label ID="lblPassRecUserCtrlHeader" runat="server" Text="Forgot Your Password?"
Width="100%" CssClass="loginCtrlHeader"></asp:Label>
</td>
</tr>
<tr>
<td align="center" colspan="2" style="height: 30px; padding-left: 5px; padding-right: 5px;">
Enter your User Name to receive your password.
</td>
</tr>
<tr >
<td align="left" valign="top" style="padding-left: 5px;">
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User
Name:</asp:Label>
</td>
<td valign="top">
<asp:TextBox ID="UserName" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="ctl00$prPassRecovery">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="center" colspan="2" style="color: Red;">
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
<tr>
<td align="right" colspan="2" style="padding-right: 5px; padding-bottom:5px;">
<asp:ImageButton ID="PassRecUserNameBtn" runat="server" CommandName="Submit" OnClick="SubmitButton_Click"
ValidationGroup="ctl00$prPassRecovery" />
</td>
</tr>
</table>
</UserNameTemplate>
<QuestionTemplate>
<table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse;"
width="100%">
<tr>
<td align="center" colspan="2">
<asp:Label ID="lblPassRecQuestHeader" runat="server" CssClass="loginCtrlHeader" Text="Security Question" CssClass="loginCtrlHeader"
Width="100%"></asp:Label>
</td>
</tr>
<%-- <tr>
<td align="left" colspan="2">
Answer the following question to receive your password.<br /><br />
</td>
</tr>--%>
<%-- <tr>
<td align="right">
User Name:
</td>
<td>
<asp:Literal ID="UserName" runat="server"></asp:Literal>
</td>
</tr>--%>
<tr >
<td align="left" valign="top" style="padding-top: 5px; padding-left: 5px;">
Question:
</td>
<td valign="top">
<asp:Literal ID="Question" runat="server"></asp:Literal>
</td>
</tr>
<tr >
<td align="left" style="padding-top: 10px; padding-left: 5px;">
<asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer">Answer:</asp:Label>
</td>
<td>
<asp:TextBox ID="Answer" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="AnswerRequired" runat="server" ControlToValidate="Answer"
ErrorMessage="Answer is required." ToolTip="Answer is required." ValidationGroup="PasswordRecovery1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="left" colspan="2" style="color: red">
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
<tr>
<td align="right" colspan="2" style="padding-right: 5px; padding-bottom:5px;">
<asp:ImageButton ID="PassRecQuestionBtn" runat="server" CommandName="Submit" ValidationGroup="PasswordRecovery1" />
</td>
</tr>
</table>
</QuestionTemplate>
<SuccessTemplate>
<table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse;"
width="100%">
<tr>
<td align="center" colspan="2">
<asp:Label ID="lblPassRecSuccHeader" CssClass="loginCtrlHeader" runat="server" Text="Thank You" CssClass="loginCtrlHeader"
Width="100%"></asp:Label>
</td>
</tr>
<tr >
<td align="left" style="height: 30px" style="padding-left: 5px;">
Thank you, Your password has been sent.
</td>
</tr>
<tr>
<td align="right" style="padding-right: 5px; padding-bottom:15px;">
<asp:ImageButton ID="PassRecCloseBtn" runat="server" OnClick="ClosePasswordSent"
ValidationGroup="PasswordRecovery1" />
</td>
</tr>
</table>
</SuccessTemplate>
</asp:PasswordRecovery>
</asp:View>
<%-- -------- Change Password ----------- --%>
<asp:View ID="vwChangePassword" runat="server">
<asp:ChangePassword ID="chngPassword" runat="server" CssClass="loginCtrlHeader">
<ChangePasswordTemplate>
<table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse;"
width="100%">
<tr>
<td align="center" colspan="2">
<asp:Label ID="lblChgPassCtrlHeader" runat="server" CssClass="loginCtrlHeader" Text="Change Password" Width="100%"></asp:Label>
</td>
</tr>
<tr >
<td align="left" style="padding-top: 5px; padding-left: 5px;">
<asp:Label ID="CurrentPasswordLabel" runat="server" AssociatedControlID="CurrentPassword">Password:</asp:Label>
</td>
<td style="padding-top:5px;">
<asp:TextBox ID="CurrentPassword" runat="server" TextMode="Password" Style="margin-left: 0px"></asp:TextBox>
<asp:RequiredFieldValidator ID="CurrentPasswordRequired" runat="server" ControlToValidate="CurrentPassword"
ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr >
<td align="left" style="padding-top: 5px; padding-left: 5px;">
<asp:Label ID="NewPasswordLabel" runat="server" AssociatedControlID="NewPassword">New Password:</asp:Label>
</td>
<td>
<asp:TextBox ID="NewPassword" runat="server" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="NewPasswordRequired" runat="server" ControlToValidate="NewPassword"
ErrorMessage="New Password is required." ToolTip="New Password is required."
ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr >
<td align="left" style="padding-top: 5px; padding-left: 5px;">
<asp:Label ID="ConfirmNewPasswordLabel" runat="server" AssociatedControlID="ConfirmNewPassword">Confirm Password:</asp:Label>
</td>
<td>
<asp:TextBox ID="ConfirmNewPassword" runat="server" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="ConfirmNewPasswordRequired" runat="server" ControlToValidate="ConfirmNewPassword"
ErrorMessage="Confirm New Password is required." ToolTip="Confirm New Password is required."
ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:CompareValidator ID="NewPasswordCompare" runat="server" ControlToCompare="NewPassword"
ControlToValidate="ConfirmNewPassword" Display="Dynamic" ErrorMessage="The Confirm New Password must match the New Password entry."
ValidationGroup="ChangePassword1"></asp:CompareValidator>
</td>
</tr>
<tr>
<td align="center" colspan="2" style="color: Red;">
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
<tr>
<td align="right" colspan="2" style="padding-right: 5px; padding-bottom:5px; padding-top:5px;">
<asp:ImageButton ID="chngPassBtn" runat="server" CommandName="ChangePassword" ValidationGroup="ChangePassword1" />
<asp:ImageButton ID="chngPassCancelBtn" runat="server" CausesValidation="False" CommandName="Cancel" />
</td>
</tr>
</table>
</ChangePasswordTemplate>
<SuccessTemplate>
<table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse;" width="100%" >
<tr>
<td align="center" colspan="2">
<asp:Label ID="lblChgPassSuccCtrlHeader" CssClass="loginCtrlHeader" runat="server" Text="Thank You" Width="100%"></asp:Label>
</td>
</tr>
<tr >
<td align="left" style="height: 30px" style="padding-left: 5px;">
Your password has been changed!
</td>
</tr>
<tr>
<td align="right" style="padding-right: 5px; padding-bottom:15px;">
<asp:ImageButton ID="chgPasswordCloseBtn" runat="server" OnClick="CloseChangePassword" />
</td>
</tr>
</table>
</SuccessTemplate>
</asp:ChangePassword>
<%-- -------- Change User Name ----------- --%>
</asp:View>
<asp:View ID="vwChangeUserName" runat="server">
<asp:Panel ID="pnChangeUser" runat="server" CssClass="loginCtrlHeader">
<table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse;" width="100%">
<tr>
<td align="center" colspan="2">
<asp:Label ID="lblChgUserCtrlHeader" CssClass="loginCtrlHeader" runat="server" Text="Change Your Username" Width="100%"></asp:Label>
</td>
</tr>
<tr >
<td align="left" style="padding-top: 5px; padding-left: 5px; width: 175px;">
Original User:
</td>
<td style="width: 200px;">
<asp:Label ID="lblOriginalUser" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr >
<td align="left" style="padding-top: 5px; padding-left: 5px; width: 175px;" valign="top">
<asp:Label ID="lblNewUsername" runat="server">New Username:</asp:Label>
</td>
<td>
<asp:TextBox ID="txtNewUsername" runat="server" Font-Size="X-Small" Width="150px"></asp:TextBox>
<asp:RequiredFieldValidator ID="rvCurrentUsernameRequired" runat="server" ControlToValidate="txtNewUsername"
ErrorMessage="New Username is required." ToolTip="New Username is required.">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr >
<td align="left" valign="top" style="width: 175px; padding-top: 5px; padding-left: 5px;">
<asp:Label ID="lblConfirmNewUsername" runat="server">Confirm Username:</asp:Label>
</td>
<td>
<asp:TextBox ID="txtConfirmNewUsername" runat="server" Font-Size="X-Small" Width="150px"></asp:TextBox>
<asp:RequiredFieldValidator ID="rvNewUsername" runat="server" ControlToValidate="txtConfirmNewUsername"
ErrorMessage="Confirm New Username is required." ToolTip="Confirm New Username is required.">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="center" colspan="2" style="color: Red;">
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
<tr>
<td align="right" colspan="2">
<asp:ImageButton ID="chgUserNameBtn" runat="server" />
<asp:ImageButton ID="chgUserNameCancelBtn" CausesValidation="False" runat="server" />
</td>
</tr>
</table>
</asp:Panel>
</asp:View>
<%-- -------- Recover User Name ----------- --%>
<asp:View ID="vwUserRecovery" runat="server">
<asp:Panel ID="pnUsrRecovery" runat="server" CssClass="loginCtrlHeader">
<table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse;"
width="100%">
<tr>
<td align="center" colspan="2" >
<asp:Label ID="lblUsrRecHeader" CssClass="loginCtrlHeader" runat="server" Text="Username Recovery" Width="100%"></asp:Label>
</td>
</tr>
<tr >
<td align="left" style="padding-left: 5px;">
<asp:Label ID="lblFname" runat="server" Text="First Name"></asp:Label>
</td>
<td style="padding-top:5px;">
<asp:TextBox ID="txtFname" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td align="left" style="padding-left: 5px;">
<asp:Label ID="lblLname" runat="server" Text="Last Name"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtLname" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td align="left" style="padding-left: 5px;">
<asp:Label ID="lblDOB" runat="server" Text="Date of Birth"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtDOB" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right" colspan="2" style="padding-right: 5px; padding-bottom:5px; padding-top:5px;">
<asp:ImageButton ID="usrRecFindBtn" runat="server" />
</td>
</tr>
</table>
</asp:Panel>
</asp:View>
</asp:MultiView>
</asp:Panel>