protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //Se inicializan campos, datos, valores
         if (Request.QueryString["op"] != null)
         {
             if (Request.QueryString["op"] == "2")
             {
                 if (Request.QueryString["id"] != null)
                 {
                     string ID;
                     ID = Request.QueryString["id"];
                     if (ID != null) //(int.TryParse(Request.QueryString["id"].ToString(), out ID))
                     {
                         ID = Request.QueryString["id"];
                         //Obtener los datos y dibujarlos.
                         RR_Blog DatosAux = new RR_Blog {
                             Conexion = Comun.Conexion, IDPublicacion = ID
                         };
                         RR_AdministradorWebNegocio CN = new RR_AdministradorWebNegocio();
                         CN.ObtenerPublicacionesBlogXID(DatosAux);
                         if (DatosAux.Completado)
                         {
                             this.CargarDatos(DatosAux);
                         }
                         else
                         {
                             //Ocurrió un error
                             Response.Redirect("frmBlogGrid.aspx?errorMessage=" + DatosAux.Completado);
                         }
                     }
                     else
                     {
                         Response.Redirect("frmBlogGrid.aspx?errorMessage=1");
                     }
                 }
                 else
                 {
                     Response.Redirect("frmBlogGrid.aspx?errorMessage=2");
                 }
             }
             else
             {
                 Response.Redirect("frmBlogGrid.aspx?errorMessage=3");
             }
         }
         else
         {
             this.IniciarDatos();
         }
     }
     else
     {
         if (Request.Form.Count == 10)
         {
             bool Band = false;
             if (imgLogo.HasFile) //Hay cambio de imagen
             {
                 Band = true;
             }
             string         Titulo      = Request.Form["ctl00$cph_MasterBody$txtTituloBlog"].ToString();
             string         Tittle      = Request.Form["ctl00$cph_MasterBody$txtNombreImagen"].ToString();
             string         Alt         = Request.Form["ctl00$cph_MasterBody$txtAlt"].ToString();
             string         Descripcion = Request.Form["ctl00$cph_MasterBody$txtDescripcion"].ToString();
             string         TextoHtml   = Request.Form["ctl00$cph_MasterBody$txtBlog"].ToString();
             string         txtUrlImg   = Band ? imgLogo.PostedFile.FileName : string.Empty;
             HttpPostedFile bannerImage = imgLogo.PostedFile as HttpPostedFile;
             int            IDColab     = -1;
             try
             {
                 string AuxID = Request.Form["ctl00$cph_MasterBody$hf"].ToString();
                 int.TryParse(AuxID, out IDColab);
                 bool NuevoRegistro = (AuxID == "-1");
                 this.Guardar(NuevoRegistro, AuxID, Titulo, Tittle, Alt, Descripcion, txtUrlImg, bannerImage, Band, TextoHtml);
             }
             catch (Exception ex)
             {
                 Response.Redirect("ErrorPage.aspx?msjError=" + ex.Message);
             }
         }
     }
 }