0
我真的不知道從哪裏開始。我試圖在ASP.Net網絡應用程序中使用reportviewer做一些事情,下次運行我的項目時,AJAX手風琴停止了在完全不同的頁面上展開。我嘗試使用NuGet重新安裝AJAXControlToolkit,但這沒有幫助。該頁面顯示摺疊的手風琴窗格,並點擊它們不會導致它們展開。爲什麼我的AJAX手風琴控制器停止工作?
編輯:好吧,所以頁面出現Javascript錯誤,但沒有一個我知道該怎麼處理。該錯誤來自scriptresource.axd。在我的網站的每個頁面上出現的錯誤,它是:
Sys.ArgumentNullException: Sys.ArgumentNullException: Value cannot be null.
Parameter name: elements [http://localhost:54342/ScriptResource.axd?d=oLn_YfKUbuAZmIp8wPx_MGof0M_lenV-JW2kiI5YDekmr8rZkMCuAuKyOZO06cyZlzhzJQ4BbUMfJShMBgWgM8TnLZXjah8CDfymeaxo44H_TH5anoZTptNOkXlY-ZNjFoS3wUNWvcmBHzSSm5K9ww2&t=252a36c5:4869]
中被拋出此錯誤的函數:
$addHandler = $type.addHandler = function DomEvent$addHandler(elements, eventName, handler, autoRemove) {
/// <summary locid="M:J#Sys.UI.DomEvent.addHandler">A cross-browser way to add a DOM event handler to an element.</summary>
/// <param name="elements">The element or text node, or array of elements or text nodes, that exposes the event. You may also pass a DOM selector or array of DOM selectors.</param>
/// <param name="eventName" type="String">The name of the event. Do not include the 'on' prefix, for example, 'click' instead of 'onclick'.</param>
/// <param name="handler" type="Function">The event handler to add.</param>
/// <param name="autoRemove" type="Boolean" optional="true" mayBeNull="true">Whether the handler should be removed automatically when the element is disposed of, such as when an UpdatePanel refreshes, or Sys.Application.disposeElement is called.</param>
var e = Function._validateParams(arguments, [
{name: "elements"},
{name: "eventName", type: String},
{name: "handler", type: Function},
{name: "autoRemove", type: Boolean, mayBeNull: true, optional: true}
]);
if (e) throw e;
^^發生在這裏的最後一行。
看起來好像我可能錯過了一些簡單的事情......將某個ID添加到控件的某處或某處,但我真的只是在猜測。
編輯2:我找到了罪魁禍首。在母版頁上我有一個用戶控件,其中我有一個Modal Popup Extender,它的一些屬性(OKButton,CancelButton等)被設置爲不存在的控件。
你有任何的JavaScript錯誤? –
@rickschott不知道我是否誤解了這個問題,或者您誤解了Schott先生的問題(也許我誤解了您的意見或javascript) – Bastardo
@OkayGuy通常這些問題是由一些導致頁面中斷的JS錯誤引起的,像手風琴不起作用。 –