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

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

  •  31-05-2022
  •  | 
  •  

문제

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.

도움이 되었습니까?

해결책

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...

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top