touseef4pk wrote:
get { return (ViewState["ID"] == null) ? 0 : Convert.ToInt32(ViewState["ID"]); }
This checks if ID value is stored in Viewstate or not. If it is saved then it is retrieved from Viewstate and sent across. If not stored in a viewstate then ID value returned would be 0.
touseef4pk wrote:
set { ViewState["ID"] = value; }
This sets the ID value tried to be set in a Viewstate. Thus, in future when you try to retrieve the value of ID, it checks the viewstate and send the value stored in it.
touseef4pk wrote:
public int ID
A public property ID is exposed on the page that has both get & set in it. Thus values can be retrieved and set using this ID property exposed.