I have a Business class say User.cs:
[Serializable]
public class User
{
public int UserID { get; set; }
public string UserName { get; set; }
public int Password { get; set; }
}
In my server side code I am writing the following code to serialize the user object in JSON format:
User user=SomeUserBLClass.GetUser(1);
Response.Write(new JavaScriptSerializer().Serialize(user));
My requirement is to hide the password being sent to client side i.e I don't want the password field to come in json data. Can you help me fixing this?