title: Using extension methods in static methods on extended classes
body: <p>I have an extension method as follows:</p>
  
  <pre><code>public static class PageExtensions
  {
      public static int GetUserId(this Page targetPage)
      {
          var user = Membership.GetUser(targetPage.User.Identity.Name);
          return (int)user.ProviderUserKey;
      }   
  }
  </code></pre>
  
  <p>Now in a page I need to use this method in a static WebMethod, so I have added another 'extension method' to PageExtensions:</p>
  
  <pre><code>public static int GetUserId()
  {
      return (int)Membership.GetUser(HttpContext.Current.User.Identity.Name).ProviderUserKey;
  }
  </code></pre>
  
  <p>and I call it as follows in my WebMethod:</p>
  
  <pre><code>PageExtensions.GetUserId()
  </code></pre>
  
  <p>Is this a good way of doing things?  Are there any other ways?</p>