Page_Load executing twice, autoeventwireup set to false
Posted on 2006-05-22
I have smartnavigation turned off (have tried with it on), and AutoEventWireup set to false (have tried with it on too). I also have .Net Framework v1.1 with SP1 installed.
my page checks for a link parameter (form_id) on the load, if is is null it will open for a new entry, if not it will search for the form_id details and fill out the page for someone to approve / reject.
By default the page loads as \\server\eforms\nocharge.aspx
When using a parameter, normally accessed through a link, it opens as \\server\eforms\nocharge.aspx?form_id=10000
page load only gets called twice when there is a parameter in the link. This happens for all events (ie: clicks etc) when the parameter is present. if the link is the default version, it works fine and page load is only called once.
How could a parameter in a link be causing the page_load to execute twice, the second time not registering as a postback?
Shortened Sample Code:
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Me.IsPostBack Then
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="nocharge.aspx.vb" Inherits="eforms.nocharge"%>