protected void btnSelectSystem_OnClick(object sender, EventArgs e) { if (ddlSystem.SelectedIndex == 0) { ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Por favor, selecione um sistema')", true); } else { short system_id = Convert.ToInt16(ddlSystem.SelectedValue); ddlSystem.Enabled = btnSelectSystem.Visible = false; mvCharacterSheets.Visible = btnDeselectSystem.Visible = true; mvCharacterSheets.ActiveViewIndex = system_id; AttributeService attributeService = new AttributeService(); gvAttributes.DataSource = attributeService.GetBySystemId(system_id); gvAttributes.DataBind(); } }