title: Finding data source for sql server connection in C#
body: <p>trying to connect to sql server from c#, using the format </p>
  
  <pre><code>    private void ConnectToSQL() 
      {    
          string connectionString = @"Data Source= ____;Initial Catalog=____;User ID=_____;Password=_____";    
          using (SqlConnection objSqlConnection = new SqlConnection (connectionString))    
          {        
             try {            
                 objSqlConnection.Open();            
                 objSqlConnection.Close();            
                 Response.Write("Connection is successfull");        
             } 
             catch (Exception ex) 
             {           
                 Response.Write("Error : " + ex.Message.ToString());        
             }    
          }
       }
  </code></pre>
  
  <p>how do I find what the data source and initial catalogue are from management studio.  Having trouble establishing a connection.</p>