Connect to MSSQL db using C#
Posted on 2007-12-06
Using Visual Web Developer 2005 (C#) to create an ASP 2.0 web form.
I've created a data grid on the page that displays the rows of a table and as a result it has created a connection string to my MSSQL2000 db in web.config.
I want to be able to create my own functions in the .aspx.cs file with their own SQL statements (for UPDATE/INSERT, etc) but I don't know how to reference the connection string in web.config to do that. Can someone help?
If you need me to be more specific, I'll try my best. I'm pretty new to .NET.