anant maurya

anant maurya

  • 1.7k
  • 54
  • 638

How to use connecting string at our web Application?

Mar 4 2022 8:50 AM

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


Answers (3)