title: How can I return null if columns have not values
body: <p>How can I <strong>return null if columns have not values</strong> and <strong>return blank (only " ")without any character for some specific fields</strong> according to this example.</p>
  
  <pre><code>       [WebMethod]
          public string HelloWorld()
          {
              return "Hello World";
          }
  
          [WebMethod]
          public DataTable GetEmployeeInformation(string USERID)
          {
              string constr = ConfigurationManager.ConnectionStrings["MyCon"].ConnectionString;
              using (SqlConnection con = new SqlConnection(constr))
              {
                  using (SqlCommand cmd = new SqlCommand("SELECT * FROM VW_NTB_EIM_O365 WHERE USERID=@USERID"))
                  {
                      using (SqlDataAdapter sda = new SqlDataAdapter())
                      {
                          cmd.Parameters.AddWithValue("@USERID", USERID);
                          cmd.Connection = con;
                          sda.SelectCommand = cmd;
                          using (DataTable dt = new DataTable())
                          {
                              dt.TableName = "NTB_EIM_O365";
                              sda.Fill(dt);
                              if (dt == null)
                              {
                                  return null;
                              }
  
                              return dt;
                          }
                      }
                  }
              }
          }
      }
  }
  </code></pre>