We have the following web page article on how to query a SQL database in ASP.NET here: https://support.discountasp.net/kb/a373/how-to-query-sql-database-with-_net-sql-data-provider.aspx