How to Disable a Trusted Handler
Handlers in .NET are triggers that fire when a user interacts with your desktop or Web app. For instance, when a user clicks a button, the OnClick handler fires. This allows you to code for the user interface and provide output to the user. To remove a handler, remove the code in the .NET code view, which is similar to HTML tags, as .NET uses tag-like layouts to define, interface and set up handlers.
Instructions
-
-
1
Open Visual Studio from your Windows program menu. Open your Web project and the file that contains the controls with event handlers you want to remove.
-
2
Click the "View Code" tab in the designer. The page's tags are display. Find the control, such as a button, image, link or any other control you want to edit.
-
-
3
Remove the handler from the control. For instance, to remove a button's OnClick handler, remove the OnClick property in the tag's definition. The following code is an example of a button with an OnClick handler definition:
<asp:Button id="mybutton" value="Click Here" OnClick="EventHandler" />
-
1