Saving data in the viewstate

Voorbeeld viewstate property: string

public string NavigateUrl
{
    get
    {
        string text = (string) ViewState["NavigateUrl"];
        if (text != null)
            return text;
        else
            return string.Empty;
    }
    set
    {
        ViewState["NavigateUrl"] = value;
    }
}

Voorbeeld viewstate propety: class

    public prop a 
    { 
        get{ 
            if (ViewState["proper"] == null) 
            { 
                ViewState["proper"] = new prop(); 
                return (prop)ViewState["proper"]; } 
            else 
                return (prop)ViewState["proper"]; } 
        set { 
            ViewState["proper"] = value ; 
        } 
    }

{{opmerking.Naam}}:

{{opmerking.OpmerkingText}}

            

Saving your comment....

Naam is verplicht!
Email is verplicht!
Opmerking is verplicht!