Render()를 실행하는 동안에만 RegisterForEventValidation을 호출할 수 있습니다.

5015 단어 validation

/Website1 응용 프로그램의 서버 오류입니다.


Render()를 실행하는 동안에만 RegisterForEventValidation을 호출할 수 있습니다.


설명: 현재 웹 요청을 실행하는 동안 처리되지 않은 예외가 발생했습니다.이 오류와 코드에서 발생하는 오류의 출처에 대한 자세한 정보를 확인하려면 창고 추적 정보를 확인하십시오.이상 세부 정보: System.Invalid OperationException: Render()를 실행하는 동안에만 Register ForEventValidation을 호출할 수 있습니다.소스 오류:
  41:         if (gvWorkTicketRecord.Rows.Count > 0)
  42:         {
행 43: objExportToFile.ToExcel(gvWorkTicketRecord, "WorkTicketReports");
  44:         }
  45:         else

소스 파일: d:\Projects\Engtek\System\Report\Manufacture\WorkTicketReports.aspx.cs 줄: 43 스택 추적:
[InvalidOperationException:   Render()   RegisterForEventValidation;]
   System.Web.UI.ClientScriptManager.RegisterForEventValidation(String uniqueId, String argument) +8642059
   System.Web.UI.WebControls.CheckBox.RenderInputTag(HtmlTextWriter writer, String clientID, String onClick) +237
   System.Web.UI.WebControls.CheckBox.Render(HtmlTextWriter writer) +179
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.WebControls.TableCell.RenderContents(HtmlTextWriter writer) +57
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +10
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.WebControls.Table.RenderContents(HtmlTextWriter writer) +206
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +10
   System.Web.UI.WebControls.GridView.Render(HtmlTextWriter writer, Boolean renderPanel) +224
   System.Web.UI.WebControls.GridView.Render(HtmlTextWriter writer) +33
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Insus.NET.ExportToFile.ExportFileParse(WebControl webCtrl, String fileName, String typeName) +299
   Insus.NET.ExportToFile.ExportToExcelFile(WebControl webCtrl, String fileName) +76
   Insus.NET.ExportToFile.ToExcel(WebControl webCtrl, String fileName) +41
   System_Report_Manufacture_WorkTicketReports.btnReportToExcel_Click(Object sender, EventArgs e) in d:\Projects\Engtek\System\Report\Manufacture\WorkTicketReports.aspx.cs:43
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

 
 
버전 정보: Microsoft.NET Framework 버전: 2.0.50727.3053;ASP.NET 버전: 2.0.50727.3053
 
해결 방법은 페이지에 속성 EnableEventValidation을 추가하고 값을false로 설정하면 됩니다.
<%@ Page Language="C#"EnableEventValidation="false"...

좋은 웹페이지 즐겨찾기