title: Writing to a dataset using web service
body: <p>I need to write some simple data to an already existing table in a dataset using.net webservice.But it gives me following error.</p>
  <pre><code>System.MissingMethodException: No parameterless constructor defined for this object.
     at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp; canBeCached, RuntimeMethodHandleInternal&amp; ctor, Boolean&amp; bNeedSecurityCheck)
     at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp; stackMark)
     at System.Activator.CreateInstance(Type type, Boolean nonPublic)
     at System.Activator.CreateInstance(Type type)
     at System.Web.Services.Protocols.ServerProtocol.CreateServerInstance()
     at System.Web.Services.Protocols.WebServiceHandler.Invoke()
     at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
  </code></pre>
  <p>Here is the code that I've tried.</p>
  <pre><code>public class DataSave : System.Web.Services.WebService
      {
          DataSet DS = new DataSet();
          DataSet _dataset;
  
          public DataSave(DataSet dataSet)
          {
              _dataset = dataSet;
          }
  
          [WebMethod]
          public void SubmitStudents()
          {
              DataSet.StudentsRow row = _dataset.Students.NewStudentsRow();
              row.Name = &quot;Sam&quot;;
              row.Age = 5;
              row.School =  &quot;PreSchool&quot;;
              row.Date = DateTime.Today;
              this._dataset.Students.Rows.Add(row);
          }
      }
  }
  </code></pre>
  <p>What causing this error?</p>