jQuery와 ASP.NET을 사용하여 버튼이 포함 된 대화 상자를 표시합니다. 몇 가지 수색 작업을 마친 후 대화 상자에 버튼을 추가하여 더 많은 자바 스크립트를 추가하여 양식에 대화 상자를 추가했습니다.DOM을 조작 할 때 ASP.NET ViewState 유효성 확인
var dlg = $('#ctl00_ctl00_PageContent_PageContent__pnlPopup').dialog({
autoOpen: false,
height: 180,
width: 500,
modal: true,
draggable: true
});
dlg.parent().appendTo($('form:first')); // without this, controls in the dialog are non-functional
내가 대화 상자를 열 때까지이 잘 작동을 닫은 다음 상위 페이지에있는 ComboBox 나하는 LinkButton 같은 컨트롤을 사용하려고합니다. 어떤 시점에서 ViewState 유효성 검사 오류가 발생합니다.
Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
이 방법이 있습니까? 나는 왜 그것이 일어나는지를 절반으로 봅니다. jQuery가 문서의 구조를 변경하고 있지만 이것이 어떻게/왜 이것이 ViewState에 영향을 미치는지 확실하지 않습니다.
해결 방법을 찾으셨습니까? 비슷한 문제가 있습니다. – earthling