What is the difference in utility/performance between using PersistenceMode on a property and storing the value of said property in ViewState in an ASP.NET web page?
This:
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[PersistenceMode(PersistenceMode.InnerProperty)]
public int ClientUno { get; private set; }
versus this:
public int ClientUno
{
get
{
if (ViewState["ClientUno"] == null) return 0;
else return (int)(ViewState["ClientUno"]);
}
set { ViewState["ClientUno"] = value; }
}
I have done some googling around the internets and can't figure this one out. It seems like this would have come up before - I just can't find the answer. Anyone?