
Signature
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
Because I am not using postback and <form runat="server" the IsPostBack
property is always false.
when I mean it runs twice I mean:
_Load method runs once on initial rendering of page.
user fills out form, and clicks html <button or <input type="submit"
codebehind enters _Load which calls a function (inside that function is one
of two redirects depending on a boolean state, one-redirects back to same
page, two-redirects to a second page.
The code goes through, hits the redirect line, but then goes back up into
the same page's _Load, and runs through again. Only on the second time
hitting the redirect code does the page actually go to the redirect location.
It's strange.
Teemu Keiski - 19 Jul 2005 15:55 GMT
Ah, I see.
Can you provide a small snippet which would demonstrate it? It's easier to
repro that way.
Thanks,

Signature
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
Erik Jensen - 21 Jul 2005 21:16 GMT
Teemu,
I appologize, looks like it was my fault. But it was baffling at first
because this was happening when browsing the page in IE only.
what I had done was an onsubmit validator for the form was bound.. but
instead of just returning true in the validator if success, it was calling
form.submit() and therefore, in IE the form appeared to post twice but in
other browsers it posted once. I found this quite odd but have corrected
the JS and it resolved the issue.
Thank you for taking the time to answer my earlier post.