Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/01/2007, 12:53
Emerald
 
Fecha de Ingreso: mayo-2006
Mensajes: 243
Antigüedad: 18 años
Puntos: 0
Pregunta Porque se hace el load dos veces en mi página??

Hola!

Por que cuando hago un debug a mi página ocurre dos veces el evento Page_Load??...

Puse brakepoints y ocurre dos veces que puedo hacer para corregirlo??

Aquí el codigo que tengo en el Load:

Código:
if (!this.IsPostBack)
            {

                rdRespuestas.Attributes.Add("onclick", "selectionClicked()");
                ImageButton1.Attributes.Add("onclick", "return ChecarEncuesta()");

                CreaMenuDias();
                CargarEncuesta();
                CargarOpina();

                string dia;
                if (this.Request.Url.ToString().IndexOf("dia").Equals(-1))
                {
                    dia = DateTime.Today.ToString("yyyy-MM-dd");
                }
                else
                {
                    //Formato de fecha del querystring: 19/12/06

                    DateTime fecha = DateTime.ParseExact((Request.QueryString["dia"]), "dd/MM/yy", CultureInfo.InvariantCulture);
                    dia = fecha.ToString("yyyy-MM-dd");

                }

                DataSet ds = new DataSet();
                string pathUNFront = front + dia + "\\UN.xml";

                System.IO.FileInfo FileUNFront = new FileInfo(pathUNFront);
                if (FileUNFront.Exists)
                {
                    ds.ReadXml(pathUNFront, XmlReadMode.InferSchema);
                    this.dgNoticias.DataSource = ds;
                    this.dgNoticias.DataBind();

                    CargarNoticias();
                }
                else
                {
                    lblMensajeError.Visible = true;
                }
            }
Gracias!

Última edición por Emerald; 05/01/2007 a las 13:17