locked
The name 'table' does not exist in the current context_ RRS feed

  • Question

  • User-1759624489 posted

     I got an error on this lines:e

     I have no idea, why, I havent changed anything.

    <asp:TemplateField>
                            <ItemTemplate>
                               
                                <asp:HyperLink ID="EditHyperLink" runat="server"
                                    NavigateUrl='<%# table.GetActionPath(PageAction.Edit, GetDataItem()) %>'
                                Text="Edit" />&nbsp;
                               
                                <asp:LinkButton ID="DeleteLinkButton" runat="server" CommandName="Delete"
                                    CausesValidation="false" Text="Delete"
                                    OnClientClick='return confirm("Esta seguro que desea eliminar esta regional?");'
                                />&nbsp;
                                <asp:HyperLink ID="DetailsHyperLink" runat="server"
                                    NavigateUrl='<%# table.GetActionPath(PageAction.Details, GetDataItem()) %>'
                                    Text="Details" />
                            </ItemTemplate>
                        </asp:TemplateField>

    Friday, August 29, 2008 12:03 PM

All replies

  • User-1759624489 posted

     I tried in a totally different page. this.

     

    <asp:TemplateField ShowHeader="False">
                                        <ItemTemplate>
                                            <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False"
                                                CommandName="Delete"   OnClientClick='return confirm("Esta seguro que quiere eliminar este registro?");'
                                                ImageUrl="~/App_Themes/SodexoTheme/ImageLibrary/icoDelete.png" Text="Delete" />
                                       <asp:HyperLink ID="DetailsHyperLink" runat="server"
                                    NavigateUrl='<%# table.GetActionPath(PageAction.Details, GetDataItem()) %>'
                                    Text="Ver Ciudades" />
                                        </ItemTemplate>
                                       
                                       
                                    </asp:TemplateField>

     

    And it shows me the same error.

     

    THANKS

    Friday, August 29, 2008 12:37 PM
  • User-1759624489 posted

     I fixed it, just puting this line out of the methods

     

     protected MetaTable table;

     

    THX!!

    Friday, August 29, 2008 12:49 PM