我正在为每个客户创建一份针对批量报告的销售代表的多页报告。
我已将整个主体放在转发器和项目模板中以重复整个页面。我不知道这是否可行,但我已经绑定了客户端ID列表,然后我想使用转发器运行该id的其余代码。
目前我在转发器内的所有代码都不可见。我已经在列表中添加了测试ID,并且还在主体顶部添加了一个p标签,以检查代码是否显示了什么。
我在最近两天研究了这个问题,到目前为止我还没有想出任何可以解决这个问题的方法。
ASPX代码
<body>
<p>Test</p>
<asp:Repeater ID="repeater" runat="server" >
<ItemTemplate>
<asp:Panel ID="header" runat="server">
<asp:Panel ID="reportName" runat="server">
<p class='text-bold-xlg'><asp:Label ID="CampaignNameData" Text="Campaign Name" runat="server"></asp:Label></p>
<p class="text-md"><asp:Label ID="ReportRangeLabel" Text="Report Range: " runat="server"></asp:Label>
<asp:Label ID="ReportRangeData" Text="<%# Container.DataItem %>" runat="server"></asp:Label></p>
</asp:Panel>
<asp:Panel ID="logo" runat="server">
<img src="images/Picture1.jpg" runat="server" enableviewstate="true"/>
</asp:Panel>
</asp:Panel>
<asp:Panel ID="info" runat="server">
<asp:Panel ID="drPersonal" runat="server">
<p class='text-bold-lg'><asp:Label ID="DoctorNameData" Text="<%# Container.DataItem %>" runat="server"></asp:Label></p>
<asp:Table ID='drInfoTable' runat="server">
<asp:TableRow>
<asp:TableCell><p class='text-bold-md'><asp:Label ID="SpecialtyLabel" Text="Specialty:" runat="server"></asp:Label></p></asp:TableCell>
<asp:TableCell><p class='text-md'><asp:Label ID="SpecialtyData" Text="" runat="server"></asp:Label></p></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell><p class='text-bold-md'><asp:Label ID="AddressLabel" Text="Address:" runat="server"></asp:Label></p></asp:TableCell>
<asp:TableCell><p class='text-md'><asp:Label ID="AddressLine1Data" Text="" runat="server"></asp:Label><br />
<asp:Label ID="AddressLine2Data" Text="" runat="server"></asp:Label><br />
<asp:Label ID="AddressLine3Data" Text="" runat="server"></asp:Label></p></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell><p class='text-bold-md'><asp:Label ID="DecileLabel" Text="Decile:" runat="server"></asp:Label></p></asp:TableCell>
<asp:TableCell><p class='text-md'><asp:Label ID="DecileData" Text="" runat="server"></asp:Label></p></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell><p class='text-bold-md'><asp:Label ID="RepLabel" Text="Rep:" runat="server"></asp:Label></p></asp:TableCell>
<asp:TableCell><p class='text-md'><asp:Label ID="RepData" Text="" runat="server"></asp:Label></p></asp:TableCell>
</asp:TableRow>
</asp:Table>
</asp:Panel>
<asp:Panel ID="Panel3" runat="server">
<img id='main-circle-1' src="images/circle-gray.png" alt=""/>
<img id='main-circle' src="images/circle-orange.png" alt=""/>
<%-- /*create a table*/--%>
<asp:Table ID="GraphicCircleData" runat="server">
<asp:TableRow>
<asp:TableCell><p class='text'><asp:Label ID="TotalTouchpointsLabel" Text="Total <br /> Touchpoints" runat="server"></asp:Label></p></asp:TableCell>
<asp:TableCell><p class='text'><asp:Label ID="TotalEngagementsLabel" Text="Total <br /> Engagements" runat="server"></asp:Label></p></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell><p class='text-lg'><asp:Label ID="TouchpointsData" Text="" runat="server"></asp:Label></p></asp:TableCell>
<asp:TableCell><p class='text-lg'><asp:Label ID="EngagementsData" Text="" runat="server"></asp:Label></p></asp:TableCell>
</asp:TableRow>
</asp:Table>
</asp:Panel>
</asp:Panel>
<asp:Panel ID="timeline" runat="server" EnableViewState="true" >
<p class='text-bold-lg' id='timeline-title'><asp:Label ID="LatestActivityLabel" Text="Latest Activity" runat="server" ></asp:Label></p>
<img id='timeline-img' src="images/timeline-sq-sm.png" alt=""/>
<asp:Table ID="timelineActivity" runat="server">
<asp:TableRow>
<asp:TableCell ID="tmImg1" runat="server"></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell ID="tmImg3" runat="server"></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell ID="tmImg5" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell><p class='text-xsm'><asp:Label ID="Timeline1ActivityA" Text="" runat="server"></asp:Label><br />
<asp:Label ID="Timeline1NameB" runat="server"></asp:Label><br />
<asp:Label ID="Timeline1DateC" runat="server"></asp:Label><br /></p></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell><p class='text-xsm'><asp:Label ID="Timeline3ActivityA" Text="" runat="server"></asp:Label><br />
<asp:Label ID="Timeline3NameB" runat="server"></asp:Label><br />
<asp:Label ID="Timeline3DateC" runat="server"></asp:Label><br /></p></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell><p class='text-xsm'><asp:Label ID="Timeline5ActivityA" Text="" runat="server"></asp:Label><br />
<asp:Label ID="Timeline5NameB" runat="server"></asp:Label><br />
<asp:Label ID="Timeline5DateC" runat="server"></asp:Label><br /></p></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell></asp:TableCell>
<asp:TableCell><p class='text-xsm'><asp:Label ID="Timeline2ActivityA" Text="" runat="server"></asp:Label><br />
<asp:Label ID="Timeline2NameB" runat="server"></asp:Label><br />
<asp:Label ID="Timeline2DateC" runat="server"></asp:Label><br /></p></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell><p class='text-xsm'><asp:Label ID="Timeline4ActivityA" Text="" runat="server"></asp:Label><br />
<asp:Label ID="Timeline4NameB" runat="server"></asp:Label><br />
<asp:Label ID="Timeline4DateC" runat="server"></asp:Label><br /></p></asp:TableCell>
<asp:TableCell></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell></asp:TableCell>
<asp:TableCell ID="tmImg2" runat="server"></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell ID="tmImg4" runat="server"></asp:TableCell>
<asp:TableCell></asp:TableCell>
</asp:TableRow>
</asp:Table>
</asp:Panel>
<asp:Panel class="tableDiv" id="directMail" runat="server">
<p class='text-bold-lg activity-title'><asp:Label ID='ProgramActivityLabelDm' Text='Program Activity - Direct Mail' runat="server" EnableViewState="true" ></asp:Label></p>
<asp:table class="activityTable" id="directMailTable" runat="server">
<asp:TableRow>
<asp:TableCell></asp:TableCell>
<asp:TableCell><p class='text-lg'><asp:Label ID="DMSentLabel" Text="Sent" runat="server" ></asp:Label></p></asp:TableCell>
</asp:TableRow>
</asp:table>
</asp:Panel>
<asp:Panel class="tableDiv" ID="emailDiv" runat="server">
<p class='text-bold-lg activity-title'><asp:Label ID="ProgramActivityLabelEm" Text="Program Activity - Email" runat="server" EnableViewState="true"></asp:Label></p>
<asp:table class="activityTable" id="emailTable" runat="server">
<asp:TableRow>
<asp:TableCell></asp:TableCell>
<asp:TableCell><p class='text-lg'><asp:Label ID="EmSentLabel" Text="Sent" runat="server"></asp:Label></p></asp:TableCell>
<asp:TableCell><p class='text-lg'><asp:Label ID="EmViewed" Text="Viewed" runat="server"></asp:Label></p></asp:TableCell>
<asp:TableCell><p class='text-lg'><asp:Label ID="EmClicked" Text="Clicked" runat="server"></asp:Label></p></asp:TableCell>
</asp:TableRow>
</asp:table>
</asp:Panel>
<asp:Panel class="tableDiv" ID="ClinCard" runat="server">
<p class='text-bold-lg activity-title'><asp:Label ID="ProgramActivityLabelCC" Text="Program Activity - ClinCard" runat="server" EnableViewState="true"></asp:Label></p>
<asp:table class="activityTable" id="clinCardTable" runat="server">
<asp:TableRow>
<asp:TableCell></asp:TableCell>
<asp:TableCell><p class='text-lg'><asp:Label ID="Label2" Text="Sent" runat="server"></asp:Label></p></asp:TableCell>
<asp:TableCell><p class='text-lg'><asp:Label ID="Label3" Text="Viewed" runat="server"></asp:Label></p></asp:TableCell>
<asp:TableCell><p class='text-lg'><asp:Label ID="Label4" Text="Clicked" runat="server"></asp:Label></p></asp:TableCell>
</asp:TableRow>
</asp:table>
</asp:Panel>
</ItemTemplate>
</asp:Repeater>
</body>
ASPX.CS代码
protected void Page_Load(object sender, EventArgs e)
{
List<int> lstHcp = new List<int>();
lstHcp.Add(1);
lstHcp.Add(2);
repeater.DataSource = lstHcp;
repeater.DataBind();
}
答案 0 :(得分:0)
您的aspx中没有<asp:Form>
标记。没有它,ASP.Net将无法处理。