Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code behind unlinked from controls
Message
General information
Forum:
ASP.NET
Category:
Web forms
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01545629
Message ID:
01545700
Views:
50
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...
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform