I am binding a list to an asp.net gridview control which displays different profiles(having attributes such as name, password,description,date etc.)
now the problem lies anyone can visiting the page is able to view all profiles but I want no one to view the "PASSWORD" of any of the profiles You may need the code for it:
Array k1 = yourlist1.ToArray();
business.clsprofiles obj = new business.clsprofiles();
List<business.clsprofilesprp> objprp = new List<business.clsprofilesprp>();
for (Int32 i = 0; i < k1.Length; i++)
{
Int32 z = Convert.ToInt32(k1.GetValue(i));
objprp.AddRange(obj.fnd_profiles(z));
}
GridView2.DataSource = objprp;
GridView2.DataBind();
con.Close();