protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)

                {
                    string valor = Convert.ToString(Request.QueryString["key"]);
                    Label1.Text = valor;
                    if (Label1.Text != "")
                    {
                        DataRow dt = Validar.Consulta(pn.ConsultarPlanid(Label1.Text)).Rows[0];
                        TextBox1.Text = dt["valor"].ToString();
                        TextBox4.Text = dt["detalle"].ToString();
                        if (dt["internet"].ToString() == "False")
                        {
                            CheckBox1.Checked = false;
                        }
                        else
                        {
                            CheckBox1.Checked = true;
                        }
                        if (dt["telefonia"].ToString() == "False")
                        {
                            CheckBox2.Checked = false;
                        }
                        else
                        {
                            CheckBox2.Checked = true;
                        }
                        if (dt["television"].ToString() == "False")
                        {
                            CheckBox3.Checked = false;
                        }
                        else
                        {
                            CheckBox3.Checked = true;
                        }


                        DropDownList1.SelectedValue = dt["tipoplan"].ToString();
                        TextBox2.Text = dt["subida"].ToString();
                        TextBox3.Text = dt["bajada"].ToString();
                        DropDownList2.SelectedValue = dt["estado"].ToString();
                    }
                    else
                    {
                        Response.Redirect("pagplan.aspx");
                    }
                }
            }
            catch (Exception)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "hwa", "error();", true);
            }
        }