I never want to split connection string using string manipulation and get server,database,uid and password.
I read the following link and read the accepted answer ,
Database name is a value of SqlConnectionStringBuilder.InitialCatalog property.