Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 19th, 2004, 10:30 AM
Authorized User
 
Join Date: Apr 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default IsPostback executed twice

Hi.

When I debug my application "IsPostBack" value is false the first two times, but it is supposed to be true after the first time the page is loaded. So the code inside IspostBack is executed always two times.

This is the code:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If Not IsPostBack Then
             If Not PopulateCombos() Then
                 lblMsg.Text = sError
             End If
        End If
End Sub

Do you know what's the problem?

 
Old February 2nd, 2005, 06:15 PM
Registered User
 
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Tengo el mismo problema... pudiste resolverlo alguna vez?

 
Old February 3rd, 2005, 12:52 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

Check whether the page property "AutoEventWireup" is set to false.

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
 
Old February 3rd, 2005, 08:41 AM
Registered User
 
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Gracias... ya lo resolvi... esta fue la situación:

Por error asigne un color al background de una tabla en vez de asignarlo al bgcolor... al parecer esto causaba una doble ejecución del Page_Load...

El background es un campo para la asignación de archivos de imagenes para fondo, al asignarle un color (por error, corté y pegué) es posible que tratara de cargar un archivo que es incorrecto y esto ocasionaba la doble ejecución del Page_Load...

Cualquier aclaratoria o complemento a la explicación, bienvenida sea...








Similar Threads
Thread Thread Starter Forum Replies Last Post
what is isPostBack amin_pucit ASP.NET 1.x and 2.0 Application Design 2 October 9th, 2013 06:30 AM
WebUserControl IsPostBack == true, always elmemo ASP.NET 2.0 Professional 4 May 4th, 2007 05:09 PM
Overriding the ispostback method Indo77 ASP.NET 1.0 and 1.1 Basics 3 April 6th, 2005 02:50 PM
IsPostBack lamdog ASP.NET 1.0 and 1.1 Basics 1 March 30th, 2005 10:42 AM
IsPostBack() swastikagaur ASP.NET 1.0 and 1.1 Basics 3 March 18th, 2005 09:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.