title: Using reflection to call an ASP.NET web service
body: <p>Say I have an ASMX web service, MyService.  The service has a method, MyMethod.  I could execute MyMethod on the server side as follows:</p>
  
  <pre><code>MyService service = new MyService();
  service.MyMethod();
  </code></pre>
  
  <p>I need to do similar, with service and method not known until runtime.  </p>
  
  <p>I'm assuming that reflection is the way to go about that.  Unfortunately, I'm having a hard time making it work.  When I execute this code:</p>
  
  <pre><code>Type.GetType("MyService", true);
  </code></pre>
  
  <p>It throws this error:</p>
  
  <blockquote>
    <p>Could not load type 'MyService' from assembly 'App_Web__ktsp_r0, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.</p>
  </blockquote>
  
  <p>Any guidance would be appreciated.</p>