I'm using ASP.NET 2.0 under VS 2005.
Page_Load
is getting called twice for my .aspx
pages. AutoEventWireup
is set to true
, but even if I set it to false and manually add the EventHandler
, it still gets fired twice.
// also set AutoEventWireup to false
public _Default() {
this.Load += new EventHander(this.Page_Load);
}
// oops -- fired twice
In the Default.aspx
page, after the user enters their username & password, I do a redirect to another page, but it seems to redirect back to the Default.aspx
page.
I don't have any <img>
tags without a src
. The tags that have a RunAt="server"
attribute are <asp:PlaceHolder>
.
For everything else, I use YUI CSS and JavaScript. I don't have any <ASP:>
controls.
What am I missing?
Update
I'm using the Button widget from the YUI library. If you specify "submit" in both Javascript and in the HTML code for a button, then when you submit, that JavaScript event gets generated twice.
This was a pain to figure out: I started commenting out bits and pieces of JavaScript and CSS (especially the includes), until the event fired only once.