title: An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.TextboxText().. same with labels
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/498400/an-object-reference-is-required-for-the-nonstatic-field-method-or-property-wi">An object reference is required for the nonstatic field, method, or property &#39;WindowsApplication1.Form1.setTextboxText(int)</a>  </p>
  </blockquote>
  
  
  
  <p>i am creating an IP tracer, which will connect to web and put value(IP) from textbox and will recieve the result. here is the code.   </p>
  
  <pre><code> using System;
      using System.Collections.Generic;
      using System.ComponentModel;
      using System.Data;
      using System.Drawing;
      using System.Linq;
      using System.Text;
      using System.Windows.Forms;
      using System.Xml;
  
      namespace geoIP
      {
          public partial class Form1 : Form
          {
              public Form1()
              {
                  InitializeComponent();
              }
  
              private void button1_Click(object sender, EventArgs e)
              {
                  iptrace();
              }
  
               public static string iptrace()
              {
                  XmlDocument xmldoc = new XmlDocument();
                  XmlNodeList xmlnode;
                  int i;
  
                  xmldoc.Load("http://freegeoip.net/xml/" + textBox1.Text);
                  xmlnode = xmldoc.GetElementsByTagName("response");
                  for (i = 0; i &lt; xmlnode.Count; i++)
                  {
                      xmlnode[i].ChildNodes.Item(0).InnerText.Trim();
                      label1.Text = "Ip Address: " + xmlnode[i].ChildNodes.Item(0).InnerText.Trim();
                      label2.Text = "Country Code: " + xmlnode[i].ChildNodes.Item(1).InnerText.Trim();
                      label3.Text = "Country Name: " + xmlnode[i].ChildNodes.Item(2).InnerText.Trim();
                      label4.Text = "Region Code: " + xmlnode[i].ChildNodes.Item(3).InnerText.Trim();
                      label5.Text = "Region Name: " + xmlnode[i].ChildNodes.Item(4).InnerText.Trim();
                      label6.Text = "City: " + xmlnode[i].ChildNodes.Item(5).InnerText.Trim();
                      label7.Text = "Zip Code: " + xmlnode[i].ChildNodes.Item(6).InnerText.Trim();
                      label8.Text = "Latitude: " + xmlnode[i].ChildNodes.Item(7).InnerText.Trim();
                      label9.Text = "Longitude: " + xmlnode[i].ChildNodes.Item(8).InnerText.Trim();
                      label10.Text = "Metro Code: " + xmlnode[i].ChildNodes.Item(9).InnerText.Trim();
                  }
  
              }
  
  
   }
  }`
  </code></pre>
  
  <p>it giving me error </p>
  
  <p>An object reference is required for the non-static field, method, or property 'geoIP.Form1.textBox1'    </p>