EditItemTemplate in FormView Won't Show (Using AJAX Controls TabPanels and VB/ASP.NET)

StackOverflow https://stackoverflow.com/questions/16923447

  •  31-05-2022
  •  | 
  •  

Domanda

I'm doing some work for a co-op/internship job and I can't seem to get this to work:

<asp:ToolkitScriptManager ID="AJAXScriptManager" runat="server">
</asp:ToolkitScriptManager>
<ajaxToolkit:TabContainer ID="NewAppTabs" runat="server" ActiveTabIndex="0" Height="500px"
    Width="968px" Font-Names="Arial" Font-Size="Small">
    <asp:TabPanel runat="server" HeaderText="Application" ID="ApplicationInformation">
        <ContentTemplate>
            <asp:FormView ID="ApplicationInformationForm" runat="server" Width="950px" BackColor="#F7F6F3"
                Font-Names="Arial" Font-Size="Small" DefaultMode="Insert">
                <ItemTemplate>
                    ReadOnly
                </ItemTemplate>
                <InsertItemTemplate>
                    Insert
                </InsertItemTemplate>
                <EditItemTemplate>
                    Edit
                </EditItemTemplate>

            </asp:FormView>
        </ContentTemplate>
    </asp:TabPanel>
    <asp:TabPanel runat="server" HeaderText="Tab 2" ID="TabPanel1">
        <ContentTemplate>
        </ContentTemplate>
    </asp:TabPanel>
    <asp:TabPanel runat="server" HeaderText="Tab 3" ID="TabPanel2">
        <ContentTemplate>
        </ContentTemplate>
    </asp:TabPanel>
    <asp:TabPanel runat="server" HeaderText="Tab 4" ID="TabPanel3">
        <ContentTemplate>
        </ContentTemplate>
    </asp:TabPanel>
</ajaxToolkit:TabContainer>

For some reason when I set the DefaultMode of the FormView to anything other than InsertMode nothing is displayed.

I was just wondering if there was anyone who could help me out. Thanks in advance.

EDIT: Updated code. I also want to note that if I specify the attribute as DefaultMode="Insert", then it works, otherwise it doesn't.

È stato utile?

Soluzione

This code works perfectly fine. It was some other VB code in the background that was changing it without me knowing. Oh the wonders of inheriting projects...

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top