title: Web method not being called
body: <p>I'm working with a VB.Net page which calls a web method from JavaScript, this was working upto a week ago and now for some reason is not working. I was wondering if anyone could give me any idea where to look as I am completely lost right now.</p>
  
  <p>Firstly my page generates a list of items that can be clicked, The line that does this is:</p>
  
  <pre><code> TicketHTML = TicketHTML + "&lt;td&gt;&lt;img src='../images/delete.png' Class='imgTicketClose'  alt='Delete Task' onclick='DeleteTicket(" + row("id").ToString() + ")' /&gt;&lt;/td&gt;&lt;/tr&gt;"
  </code></pre>
  
  <p>I know this is working as when the item is clicked I get a javascript popup so I would assume the problem is not here.</p>
  
  <p>Now my Javascript:</p>
  
  <pre><code>    function DeleteTicket(ticketID) 
       {
          var answer = confirm("Do you really want to delete this task?")
          if (answer) 
          {
             PageMethods.DeleteTask(ticketID);
             window.location.reload()
          }
       }
  </code></pre>
  
  <p>I assume the problem is here as the web method never seems to call and the page doesnt seem to reload either, but I dont understand why this would be failing if  the javascript displays the confirm dialog.</p>
  
  <p>In the interest of completeness here is my web method though I know this is not being called as I have profiled the database.</p>
  
  <pre><code> &lt;System.Web.Services.WebMethod()&gt;
     Public Shared Sub DeleteTask(ticketID As Integer)
    Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("Blueprint").ToString())
  
    Dim cmd As New SqlCommand
    cmd.CommandType = CommandType.StoredProcedure
    cmd.CommandText = "spDeleteNonTicketItem"
    cmd.Parameters.AddWithValue("@ItemID", ticketID)
  
    cmd.Connection = conn
  
    conn.Open()
  
    cmd.ExecuteNonQuery()
  
    conn.Close()
  
     End Sub
  </code></pre>
  
  <p>So where could I look?  Any advice would be greatly appreciated. Thanks</p>
  
  <p>EDIT:  Could anything in the web.config file be preventing page methods from executing? 
  I have just noticed this happening with a completely seperate web method and have checked the integers being passed into the javascript with an alert() and they are all valid</p>