Imports System.ComponentModel.DataAnnotations Imports System.Web Imports System.Web.Security Public Class ChangePasswordModel Private _User As MembershipUser Public Sub New() If String.IsNullOrEmpty(_UserName) = True Then _User = Membership.GetUser(HttpContext.Current.User.Identity.Name) End If End Sub Private _UserName As String Public Property UserName() As String Get Return _User.UserName End Get Set(value As String) _User = Membership.GetUser(value) End Set End Property Public Property OldPassword() As String Public Property NewPassword() As String Public Property ConfirmPassword() As String End Class