Tuesday, January 21, 2014
Monday, January 20, 2014
How to set UserName property value in customized MembershipUser class?
Because in base class UserName property is read only.
public virtual string UserName { get; }
So need to call base constructor to set the value
public virtual string UserName { get; }
So need to call base constructor to set the value
public class CustomerUser : MembershipUser
{
public string CID { get; set; }
public CustomerUser(string username, string cid:
base("CustomerMembershipProvider",
username,
null,
null,
null,
null,
true,
false,
System.DateTime.Now,
System.DateTime.Now,
System.DateTime.Now,
System.DateTime.Now,
System.DateTime.Now)
{
CID= cid;
}
}
Friday, January 17, 2014
How to check if variable is null or empty string in JavaScript?
if(variable) {}
It will return false If variable is
empty string
NULL
undefined
Subscribe to:
Posts (Atom)