Are you sure you're dropping an asp:button control (which is a submit button) rather than a Html button (which is input type="button"). The latter is a client side button while the former is a postback submit button. That would explain the script block.
FWIW - don't use the designer for this - just write it in by hand - much faster process getting things done IMHO. Hooking up events is one thing though that the designer does nicely. I tend to get elements defined in markup text, then use the designer to hook up events as needed after. Usually faster and less friction with the designer wanting to do some unwanted work for you :-)
+++ Rick ---
>This problem is driving me crazy - I have an old web project that I need to make some changes to. However, I have a couple problems: the first is that when I double-click on a web control (i.e. asp:button), instead of going to the relevant code-behind procedure, it jumps to the top of the asp.net page, adds a script tag and proceeds to add the proc there.
>
>I have tried a couple things, such as deleting the button and re-adding, removing the onclick=login1_click in the asp button and using a handles statement in the vb code. As far as I can see the page should be wired up to the code. Is there some metadata that could be corrupted? It simply doesn't act correctly...