You can even place an arrayList inside the Profile object something like this:
System.Collections.ArrayList aList = new System.Collections.ArrayList();
aList.Add("Azam");
aList.Add("John");
aList.Add("Saif");
Profile["Name"] = aList;
Don't forget to add a type attribute in your web.config so that Asp.net will know the type of object you are putting inside the Profile object.
type="System.Collections.ArrayList"
defaultValue="??"
allowAnonymous="true" />
if you don't specify the type object you will get an error.
No comments:
Post a Comment