2012-03-27 17 views
0

我使用C#處理程序(ashx的),出現此錯誤:未捕獲的ReferenceError:處理程序沒有定義

ProviderGrid.js:23 Uncaught ReferenceError: Handler is not defined

這是我處理程序文件:

<%@ WebHandler Language="C#" Class="dashVidence.Handler" %> 

using System; 
using System.Web; 

namespace dashVidence 
{ 

    public class Handler : IHttpHandler 
    { 
//ReturnProvider contain a method returning string datas 
     ReturnProvider rp = new ReturnProvider(); 
     public void ProcessRequest(HttpContext context) 
     { 

     } 

     public bool IsReusable 
     { 
      get 
      { 
       return false; 
      } 
     } 

     public string provider() 
     { 
      return rp.getProvidersList(); 
     } 

    } 
} 

處理程序文件在ASPX引用文件

+0

認爲您的標籤可能是錯誤的,這與extjs沒有任何關係。 – Amalea 2012-03-27 16:14:37

+3

這是一個JavaScript錯誤,對不對?你的JavaScript在哪裏? – jrummell 2012-03-27 16:17:15

+0

ProviderGrid.js的第23行是什麼? – 2012-03-27 16:17:36

回答

-1

Please add debugger; to this line.

$(function() { 
>   debugger; <------------------HERE 
>   $('#feedbackform').submit(function() { 

現在在瀏覽器中右鍵單擊檢查元素並轉到控制檯選項卡。如果你不打這一行的onload轉

debugging on in your web.configuration.

hit submit. if you hit the line just go through it line by line and the offending line will throw a error.

if it just throws a error like the image below. Sorry not enough rep points to post image directly. :(

http://postimg.org/image/5ke0jd6xv/

then it is the line above other wise check out the stack.

Hope this helps

引用我的自我是驚人的:)

雖然你做了什麼時,失敗,錯誤插入的調試器上它上面的水平。 請注意,這是一個javascript錯誤

相關問題