private bool TrySetControlValueFromCookie(string cookiename, SelectDateControl sd)
 {
     HttpCookie cookie = Request.Cookies[cookiename];
     if (cookie == null) 
         return false;
     DateTime dt;
     if (! DateTime.TryParse(cookie.Value, out dt))
         return false;
     sd.SelectedDate = dt;
     return true;
 }
    private bool TrySetControlValueFromCookie(string cookiename, SelectDateControl sd)
    {
        HttpCookie cookie = Request.Cookies[cookiename];

        if (cookie == null)
        {
            return(false);
        }
        DateTime dt;

        if (!DateTime.TryParse(cookie.Value, out dt))
        {
            return(false);
        }
        sd.SelectedDate = dt;
        return(true);
    }