if(!IsPost){ if(!Request.QueryString["ID"].IsEmpty() && Request.QueryString["ID"].IsInt()) { // Etc.