protected void Page_Load(object sender, EventArgs e) { if (Page.IsCallback) { return; } if (Session["usuario"] == null) { Response.Redirect("~/Inicio.aspx"); } user = (UsuarioBC)Session["usuario"]; if (!IsPostBack) { CargaDrops(); ListItem lInicial = new ListItem("<svg height=\"30\" width=\"30\"><path transform=\"scale(0.7) translate(20, 45)\" stroke=\"#000\" fill=\"#1B18C9\" d=\"M 0,0 C -2,-20 -10,-22 -10,-30 A 10,10 0,1,1 10,-30 C 10,-22 2,-20 0,0 z\" /></svg>", "0"); rb_editIconos.Items.Add(lInicial); DataTable dt = new IconoBC().ObtenerTodo(); foreach (DataRow dr in dt.Rows) { string path = System.Web.Configuration.WebConfigurationManager.AppSettings["imgOrigen"]; ListItem lItem = new ListItem(string.Format("<img width=\"30\" src=\"{0}/{1}\" >", path, dr["ICON_URL"].ToString()), dr["ICON_ID"].ToString()); rb_editIconos.Items.Add(lItem); } ObtenerOrigenes(true); } }
protected void rb_editIconos_SelectedIndexChanged(object sender, EventArgs e) { if (rb_editIconos.SelectedIndex > 0) { string path = System.Web.Configuration.WebConfigurationManager.AppSettings["imgOrigen"]; IconoBC i = new IconoBC().ObtenerXId(Convert.ToInt32(rb_editIconos.SelectedValue)); hf_iconOrigen.Value = path + "/" + i.ICON_URL; } else { hf_iconOrigen.Value = ""; } ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "map", "mapa();", true); }