Code Behind Database Operations

  • Robert E. Beasley


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.

Copyright information

© Robert E. Beasley 2020

Authors and Affiliations

  • Robert E. Beasley
    • 1
  1. 1.FranklinUSA

Personalised recommendations