Where to place Connection String of SQL Server (hosted on Azure) in Web Forms Website


I am trying to use Microsoft Azure to host an ASP.NET Web Forms website, and connecting an SQL Server database (also hosted on Azure) to it.

So far:

  • I created the SQL Server database and have added a table to it, using Microsoft SQL Server Management Studio
  • I have published the website, and it is currently hosted on Azure.
  • When I created the website, I linked the above SQL database to it. So the database table displays in 'Server Explorer' in Visual Studio when I open my website.

My problem now is that I don't know how to retrieve (SELECT) data from the database table, and display it on the website.

On Azure portal, I found the Database connection strings (ADO.NET (SQL authentication)), but I don't know where I need to copy and paste this connection string within my project.

Can someone please help me and advise me how to proceed?

Thanks a lot in advance!

0 answers