protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                Comentarios coment = new Comentarios();
                if (coment.EntregarComentarios() != null)
                {
                    string numnot = Request.QueryString["noticia"];
                    if (numnot != null)
                    {
                        Repeater1.DataSource = coment.Entregarcomentarioporidnoticia(int.Parse(numnot));
                        Repeater1.DataBind();
                    }
                    else
                    {
                        Response.Redirect("Error.aspx");
                    }
                }
            }

            int      idnoti = int.Parse(Request.QueryString["noticia"]);
            Noticias noti   = new Noticias();

            if (noti.EntregarNoticiaporID(idnoti) != null)
            {
                Titulo.Text = noti.EntregarNoticiaporID(noti.NoticiaPrincipal()).Rows[0][6].ToString();
                string Text = noti.EntregarNoticiaporID(noti.NoticiaPrincipal()).Rows[0][1].ToString();
                //separa los textos por el espacio.
                int    buscador = Text.IndexOf("<br/>");
                string parrafo  = Text.Substring(buscador);
                Parrafo1.Text = parrafo;
                Parrafo2.Text = Text.Substring(buscador, parrafo.Length);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            bool a = false;

            if (Session["user"] != null)
            {
                a = true;
            }

            if (!a)
            {
                if (Session["admin"] != null)
                {
                    Response.Redirect("indexlog.aspx");
                }
            }
            else
            {
                Response.Redirect("indexlog.aspx");
            }

            Noticias noti = new Noticias();

            if (noti.NoticiaPrincipal() != -1)
            {
                TituloPrincipal.NavigateUrl += "?noticia=" + noti.NoticiaPrincipal();
                TituloPrincipal.Text         = noti.EntregarNoticiaporID(noti.NoticiaPrincipal()).Rows[0][6].ToString();
                TextoPrincipal.Text          = noti.EntregarNoticiaporID(noti.NoticiaPrincipal()).Rows[0][1].ToString();
            }

            //separa los textos por el espacio.
            TituloNoticia1.Text = noti.EntregarNoticiaporID(noti.NoticiaPrincipal()).Rows[0][6].ToString();
            int    buscador = TextoPrincipal.Text.IndexOf("<br/>");
            string parrafo  = TextoPrincipal.Text.Substring(buscador);

            TextoNoticia1_1.Text = parrafo;
            TextoNoticia1_2.Text = TextoPrincipal.Text.Substring(buscador, parrafo.Length);
        }