protected void btnregistrar_Click(object sender, EventArgs e) { TheGym k = new TheGym { NombreProveedor = tbnombre.Text, CUITProveedor = tbcuit.Text, EmailProveedor = tbemail.Text, RepresentanteProveedor = tbrepresentante.Text, TelefonoProveedor = tbtelefono.Text, CalleProveedor = tbcalle.Text, NumCasaProveedor = tbnumerocasa.Text, FKLocalidadProveedor = ddllocalidad.SelectedValue, }; try { k.AddNewProveedor(); ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "$('#modal-default').modal('show');", true); } catch (Exception ex) { lblerror.Text = ex.Message.ToString(); } tbnombre.Text = string.Empty; tbcuit.Text = string.Empty; tbrepresentante.Text = string.Empty; tbemail.Text = string.Empty; tbcalle.Text = string.Empty; tbnumerocasa.Text = string.Empty; tbtelefono.Text = string.Empty; ddllocalidad.ClearSelection(); }