Skip to Content
Visual Basic 2015 Unleashed
book

Visual Basic 2015 Unleashed

by Alessandro Del Sole
July 2015
Intermediate to advanced
1300 pages
87h 27m
English
Sams
Content preview from Visual Basic 2015 Unleashed

Handling Events

Due to the code-behind logic, handling events in ASP.NET applications looks similar to what you saw with WPF. This means that a user control is implemented on the XHTML side and an event handler in the Visual Basic side.

Handling Events Tip

If you need to catch events from objects that are not user controls, such as business objects or collections, you just write the event handler in Visual Basic code the usual way.

For example, consider the following XHTML code that provides a Button and a Label:

<form id="form1" runat="server"><div>    <asp:Button ID="Button1" runat="server" Text="Button"/>    <asp:Label ID="Label1" runat="server"></asp:Label></div></form>

You can handle the Button.Click as ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Visual Basic 2015

Beginning Visual Basic 2015

Bryan Newsome

Publisher Resources

ISBN: 9780134196664Purchase book