IF (certain flags are set) Response.ExpandPage(Config.cHTMLPagePath+[AccountStatus.awp]) ENDIF
So the browser URL was actually pointing to RegStatus.awp and when the page got reposted it was based on the RegStatus code. Because of the different context, it never hit the above ExpandPage command so the AccountStatus code was never executed. I got around this by changing the above code to Response.Redirect([AccountStatus.awp]) - when displayed that way my AccountStatus buttons work correctly.
I'm still not totally clear on how the button Click events are actually activated. How does the framework know when the page was submitted by btnClick and thus to bind in the btnPay_Click method? Is this detailed somewhere in the docs? Or could you point me to the code block that handles this logic?
Thanks,
--stein
Stein,
Can you check what actually gets generated in the HTML output? Buttons don't use __doPostBack() - they just submit the form since they 'naturally' submit. It's just a submit button.
Does the app actually post back to the server when you click the button? Or is it just going on the client side? One thing might be the runat='server' - use double quotes. Web Connection doesn't parse single quoted attributes. That might account for the problem since if it's not a server control it won't render properly...
+++ Rick ---
I've got a framework page with a what should be a standard button:
For whatever reason, I cannot get the click event to fire. Clicking the button simply reposts the page as tho there were no Click property. And I have no idea how to debug this because I don't really know how this stuff works. There's a __doPostBack js function that's somehow involved, even though it does not explicitly show up in the page's HTML source. (How does that work anyway?) How can I tell if it's actually firing, or what parameters it's getting?
What could cause a button to fail like this? I've built many such pages with multiple buttons on them, all calling xxxx_Click events and they always just work (which is one reason I never thought about the actual mechanism behind them).
--stein