protected void createCollectorPayment_Click(object sender, EventArgs e) { try { Int32 paymentId = Int32.Parse(this.Payment.SelectedValue); Int32?quantityLimit = null; if (!string.IsNullOrWhiteSpace(this.QuantityLimit.Text)) { quantityLimit = Int32.Parse(this.QuantityLimit.Text); } var collectorPayment = SystemManager.AddPaymentToCollector(this.CollectorId, paymentId, quantityLimit); Response.Redirect(_UrlSuffix(string.Format("charges.aspx?surveyid={0}&collectorId={1}&textslanguage={2}", this.Surveyid, this.CollectorId, this.TextsLanguage)), false); this.Context.ApplicationInstance.CompleteRequest(); } catch (Exception ex) { this.ErrorMessage = ex.Message; } }