/// <summary> /// Handles the Click event of the btnSave control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param> protected void btnPrint_Click(object sender, EventArgs e) { using (var rockContext = new RockContext()) { var device = new DeviceService(rockContext).Get(ddlDevice.SelectedValueAsInt() ?? 0); if (device != null) { ceLabel.Text = cbForceUTF8.Checked ? ceLabel.Text.Replace("^CI0", "^CI28") : ceLabel.Text; ZebraPrint.PrintLabel(device.IPAddress, ceLabel.Text); } } }