1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Error in code while uploading a .ascx page

Error in code while uploading a .ascx page

2 posts, 0 answered
  1. Shilpa Reddy
    Shilpa Reddy avatar
    2 posts
    Registered:
    15 Jan 2010
    11 May 2010
    Link to this post
    Hi There!..
    I am using a GridView and i have added below code for that. I am getting error in Header Template and in one of the <td> tag. Please find the attachment for error page.

    <HeaderTemplate>
         '<%=reviewer1%>'
    </HeaderTemplate>

    <td style="width:25%" align="center"><%=reviewer1%></td>


    Can you please help me with this issue. What change i need to do for such things.


     <asp:DataGrid id="dgScorecard" Runat="server" Width="100%" AutoGenerateColumns="False" GridLines="None">
                        <HeaderStyle CssClass="datagridHeader" />
                        <ItemStyle CssClass="datagridItem" />
                        <AlternatingItemStyle CssClass="datagridAlternatingItem" />
                        <Columns>
                            <asp:BoundColumn HeaderText="#" DataField="CriteriaID" ItemStyle-VerticalAlign="Top" ItemStyle-Width="5%"></asp:BoundColumn>
                            <asp:TemplateColumn ItemStyle-Width="65%" HeaderText="Criteria">
                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" Width="60%"></ItemStyle>
                                <ItemTemplate>
                                    <asp:Label ID="lblCriteria" runat="server"></asp:Label>
                                </ItemTemplate>
                                <HeaderTemplate>
                                    Criteria
                                </HeaderTemplate>
                            </asp:TemplateColumn>
                            <asp:TemplateColumn ItemStyle-Width="10%">
                                <ItemStyle VerticalAlign="Top" HorizontalAlign="center" Wrap="True" Width="10%"></ItemStyle>
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemTemplate>&nbsp;
                                    <asp:Label ID="lblRev1Evaluation" runat="server"></asp:Label>
                                </ItemTemplate>
                                <HeaderTemplate>
                                    '<%=reviewer1%>'
                                </HeaderTemplate>
                            </asp:TemplateColumn>
                            <asp:TemplateColumn ItemStyle-Width="10%">
                                <ItemStyle VerticalAlign="Top" HorizontalAlign="center" Wrap="True" Width="10%"></ItemStyle>
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemTemplate>&nbsp;
                                    <asp:Label ID="lblRev2Evaluation" runat="server"></asp:Label>
                                </ItemTemplate>
                                <HeaderTemplate>
                                    <%=reviewer2%>
                                </HeaderTemplate>
                            </asp:TemplateColumn>
                            <asp:TemplateColumn ItemStyle-Width="10%">
                                <ItemStyle VerticalAlign="Top" HorizontalAlign="center" Wrap="True" Width="10%"></ItemStyle>
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemTemplate>&nbsp;
                                    <asp:Label ID="lblRev3Evaluation" runat="server"></asp:Label>
                                </ItemTemplate>
                                <HeaderTemplate>
                                    <%=reviewer3%>
                                </HeaderTemplate>
                            </asp:TemplateColumn>
                            <asp:BoundColumn DataField="Criteria" Visible="False"></asp:BoundColumn>
                            <asp:BoundColumn DataField="ReviewerNotes" Visible="False"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Reviewer1Evaluation" Visible="False"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Reviewer1Comment" Visible="False"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Reviewer2Evaluation" Visible="False"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Reviewer2Comment" Visible="False"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Reviewer3Evaluation" Visible="False"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Reviewer3Comment" Visible="False"></asp:BoundColumn>
                            <asp:BoundColumn DataField="IsBoolean" Visible="False"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Reviewer1Name" Visible="False"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Reviewer2Name" Visible="False"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Reviewer3Name" Visible="False"></asp:BoundColumn>
                        </Columns>
                    </asp:DataGrid>
                </td>
            </tr>
            <tr>
                <td colspan="4">&nbsp;</td>
            </tr>
        </table>
        <br />
        <table border="1" cellpadding="2" cellspacing="0" width="100%">
            <tr>
                <td colspan="4" style="background-color:#71797a; color:#e1e8ea; font-weight:bold;">
                    Overall Evaluation</td>
            </tr>
            <tr>
                <td style="width:25%">&nbsp;</td>
                <td style="width:25%" align="center"><%=reviewer1%></td>
                <td style="width:25%" align="center"><%=reviewer2%></td>
                <td style="width:25%" align="center"><%=reviewer3%></td>
            </tr>



    Thank You,
    --Shilpa


  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    11 May 2010
    Link to this post
    Hello Shilpa Reddy,

    In your template/control there is no such variable or control - reviewer1, but you have some reference to it which cause the error.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
2 posts, 0 answered