an object reference is required for the nonstatic field method or property
<pre><code>[System.Web.Services.WebMethod]
public static void GetCurrentTime(string name)
{
    string strFileName = "D://Data.csv";
    string connectionstring = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\;Extended Properties='text;HDR=Yes;FMT=Delimited';";
    OleDbConnection connection = new OleDbConnection();
    connection.ConnectionString = connectionstring;
    OleDbCommand command = new OleDbCommand();
    command.CommandType = CommandType.Text;
    command.Connection = connection;

    if (name != "")
    {
        command.CommandText = "select * from " + System.IO.Path.GetFileName(strFileName);// +" where F=" + txtmtcn.Text;
        connection.Open();
        DataTable dt = new DataTable();
        dt.Load(command.ExecuteReader());
        dt.Columns[5].ColumnName = "MTCN";
        dt.DefaultView.RowFilter = " MTCN =" + name;
        dt = dt.DefaultView.ToTable();
        TxtSenderFirstName.Text = dt.Rows[0][7].ToString();
        connection.Close();
    }
}
</code></pre>

<p>i get Error "an object reference is required for the nonstatic field method or property" how will i access my text box controls and populate data in them.</p>
