3
Answers

How to use connecting string at our web Application?

anant maurya

anant maurya

2y
674
1

 public static string CONNECTION_STRING = "";
        public static string getconnection()
        {
            if (CONNECTION_STRING.Trim() == "")
            {
                CONNECTION_STRING = ConfigurationManager.ConnectionStrings["BloggingDatabase"].ConnectionString;
            }
            return CONNECTION_STRING;
        }
       
    }

Answers (3)