我的页面.aspx:
<asp:TextBox ID="txtPageCount" runat="server" EnableViewState="true" ></asp:TextBox>
<rc:ReportControl id="ReportControl1" runat="server" />
报告控制.ascx:
<div>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" CssClass="ReportViewer" AsyncRendering="false"
OnPreRender="RptViewer_PreRender" EnableViewState="true" Width="100%" PageCountMode="Actual"
WaitMessageFont-Size="1.2em" ShowToolBar="true" Visible="true"
InteractiveDeviceInfos="(Collection)">
<LocalReport></LocalReport>
</rsweb:ReportViewer>
</div>
在报告处理(RptViewer_PreRender
)之后,Render
如果发生MyPage.aspx
,我正在更新 的值txtPageCount
。
protected override void Render(HtmlTextWriter writer)
{
base.Render(writer);
TextBox pageCount = new TextBox();
pageCount = (TextBox)RtDialysisSummary.FindControl("txtPageCount");
pageCount.Text = Convert.ToString(ReportViewer1.TotalPages);
}
文本框的值没有更新。