Connection String Değerini Web.Config ve App.Config dosyalarından aynı kod ile okuma

Aşağıdaki kod parçacığı ile hem App.Config dosyasından hemde Web.Config dosyasından Connection String değerini okuyabiliriz.

private string baglantiCumlesi = ConfigurationManager.ConnectionStrings["BaglantiCumlesi"].ToString();

This entry was posted on Monday, November 23rd, 2009 at 02:21 and is filed under Murat Topçu. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply