But how do you retrieve the string from the config file and use it in a page?
This is a good thing since there is only one place to edit the connection string. So if something changes you only have to look once for the string.
One setting that is useful is the connection string setting. If you are connected to a database you can store all the connection string variables in the web.config file and reference them from pages within the website.
Web.config is the main settings and configuration file for an web application. The file is an that defines configuration information regarding the web application. The web.config file contains information that control module loading, security configuration, configuration, and application language and compilation settings.
In a website created using ASP .net there is a file called web.config . This file holds information about the website’s configuration.
Retrieving the connection string in a .net application
some helpful info I found to be..uh….helpful
Retrieving the connection string in a .net application « Noob Nuggets
Комментариев нет:
Отправить комментарий