private void SendToClient() { if (!Page.ClientScript.IsStartupScriptRegistered("LottoResults")) { var sorted = SystemAccess.IsAuthenticated && chkSorted.Checked; Page.ClientScript.RegisterStartupScript(Page.GetType(), "LottoResults", _game.Do(cboGame.SelectedIndex, _savePath, (int)cboLastRounds.SelectedItem.Value, sorted, (string)cboFilterRounds.SelectedItem.Value), true); } }