Abstract
There are many times when it is necessary to establish a connection to a database and execute SQL commands against that database from the code behind of a page. For example, we may require the end user to click a Display button to display the contact information of his or her organization’s customers in a non-data-bound control like a multiline text box. Or we may require the end user to enter his or her login credentials and click a Login button to gain access to their application’s functionality. In both of these scenarios, we would need a page that interacts with a database from the button Click event handler method in the page’s code behind.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
A SQL Server instance is a complete SQL Server service with its own databases, credentials, and so forth. A computer can have more than one SQL Server instance installed and running at one time.
- 2.
All property, method, and event descriptions were taken directly from Microsoft’s official documentation. The event handler methods used to handle the events of this class were omitted to conserve space. See the reference for all of the methods of this class.
- 3.
All property, method, and event descriptions were taken directly from Microsoft’s official documentation. The event handler methods used to handle the events of this class were omitted to conserve space. See the reference for all of the methods of this class.
- 4.
All property, method, and event descriptions were taken directly from Microsoft’s official documentation. The event handler methods used to handle the events of this class were omitted to conserve space. See the reference for all of the methods of this class.
- 5.
All property, method, and event descriptions were taken directly from Microsoft’s official documentation. The event handler methods used to handle the events of this class were omitted to conserve space. See the reference for all of the methods of this class.
- 6.
All property, method, and event descriptions were taken directly from Microsoft’s official documentation. The event handler methods used to handle the events of this class were omitted to conserve space. See the reference for all of the methods of this class.
- 7.
All property, method, and event descriptions were taken directly from Microsoft’s official documentation. The event handler methods used to handle the events of this class were omitted to conserve space. See the reference for all of the methods of this class.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2020 Robert E. Beasley
About this chapter
Cite this chapter
Beasley, R.E. (2020). Code Behind Database Operations. In: Essential ASP.NET Web Forms Development. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-5784-5_23
Download citation
DOI: https://doi.org/10.1007/978-1-4842-5784-5_23
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-5783-8
Online ISBN: 978-1-4842-5784-5
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)