private string? typeOfContract
{
get { return (string?)ViewState["typeOfContract"]; }
set { ViewState["typeOfContract"] = value; }
}
Later in the code I use it like this:
typeOfContract = Request.QueryString["type"];
I am getting the following error at the declaration of typeOfContract line stating "The type 'string' must be a non-nullable value type in order to use it as parameter 'T' in the generic type or method 'System.Nullable'"
Any ideas? Basically, I want to make sure that "type" exists in the queryString before performing an action.
Thanks in advance.