2013-10-25 135 views
0

首先,不要投票。我已經徹底搜索了這個問題的stackoverflow,但沒有找到一個。System.ArgumentException:值不能爲空或爲空。參數名稱:處理器

我從實時應用程序收到此異常。這太籠統了,不能發佈我的代碼。如果有人要求在頁面上發佈我的代碼,我也會發布。

錯誤已記錄,我不知道如何重現它。

System.ArgumentException: Value cannot be null or empty. 
Parameter name: handler 
    at System.Web.UI.ScriptComponentDescriptor.AddEvent(String name, String handler) 
    at AjaxControlToolkit.ScriptObjectBuilder.DescribeComponent(Object instance, ScriptComponentDescriptor descriptor, IUrlResolutionService urlResolver, IControlResolver controlResolver) 
    at AjaxControlToolkit.ExtenderControlBase.RenderScriptAttributes(ScriptBehaviorDescriptor descriptor) 
    at AjaxControlToolkit.ExtenderControlBase.GetScriptDescriptors(Control targetControl) 
    at System.Web.UI.ExtenderControl.System.Web.UI.IExtenderControl.GetScriptDescriptors(Control targetControl) 
    at System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IExtenderControl extenderControl) 
    at System.Web.UI.ScriptManager.RegisterScriptDescriptors(IExtenderControl extenderControl) 
    at System.Web.UI.ExtenderControl.Render(HtmlTextWriter writer) 
    at AjaxControlToolkit.ExtenderControlBase.Render(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) 
    at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) 
    at System.Web.UI.Control.Render(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) 
    at System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer) 
    at System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) 
    at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) 
    at System.Web.UI.Control.Render(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) 
    at System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer) 
    at System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) 
    at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) 
    at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) 
    at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) 
    at ASP.candidateresume_aspx.__RenderContent5(HtmlTextWriter __w, Control parameterContainer) 
    at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) 
    at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) 
    at System.Web.UI.Control.Render(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) 
    at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) 
    at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) 
    at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) 
    at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) 
    at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) 
    at System.Web.UI.Control.Render(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) 
    at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) 
    at System.Web.UI.Page.Render(HtmlTextWriter writer) 
    at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) 
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 

添加代碼超過了問題的字符限制。我不認爲代碼中有什麼錯誤。這是一個非常通用的例外。

的代碼上傳到谷歌文檔

Code

+1

請在此分享代碼塊,這樣可以確定什麼是問題 – krish

+0

我很抱歉克里斯,但我無法添加代碼,因爲它超過了允許的字符數限制。 –

+0

檢查AjaxControlToolkit控件中客戶端事件的空值(例如'OnClientPopulated =「」') –

回答

-4

的錯誤是明顯的

System.ArgumentException:值不能爲空。 參數名稱:處理程序 at System.Web.UI.ScriptComponentDescriptor.AddEvent(String name,String handler)

問題是Handler爲null或爲空。

發佈您的代碼,我們將看到如何爲您提供幫助。 謝謝

+0

正如我所提到的,這個錯誤是非常通用的,並沒有被代碼生成。我的頁面上不會調用堆棧跟蹤上的任何行。處理程序在System.Web.UI.ScriptComponentDescriptor.AddEvent(String名稱,字符串處理程序)處爲null,當ajaxtoolkit執行後端處理時調用 –

+0

以下是代碼https://drive.google.com/file/d/0B_LJ7JfgiyasbjhVMEFHbWY4TGc/編輯?usp = sharing –

+0

調用堆棧中的所有代碼都在.NET框架中時不清楚。錯誤可能很明顯,但修復不是 – Mick

相關問題