anant maurya

anant maurya

  • NA
  • 52
  • 584

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)