views:

62

answers:

0

Hi,

I have a UpdatePanel includes some panels. I want to add to these panel some controls according to the operations. After i click any button twice or after first page load the page gives error. Either I have to use each panel without any post back [no page refresh] how can i solve this? the html code is below.

wordOrgButton enables word panel and after any operation fills that word panel. same for userOrgButton

<asp:UpdatePanel ID="mainPanel" runat="server" Height="220px">
    <ContentTemplate>
    <fieldset>
        <asp:Panel ID="buttonsPanel" runat="server">
            <asp:Button ID="wordOrgButton" runat="server" Text="Words" 
                onclick="wordOrgButton_Click" />
            <asp:Button ID="userOrgButton" runat="server" Text="User" 
                onclick="userOrgButton_Click" />
            <asp:Button ID="exitButton" runat="server" Text="Exit" 
                onclick="exitButton_Click" />
        </asp:Panel>
        <asp:Panel ID="usersPanel" runat="server">
            <asp:TextBox ID="whoisUserTextBox" runat="server"></asp:TextBox>
            <asp:Button ID="catchUserButton" runat="server" Text="Bring" 
                onclick="catchUserButton_Click" />
        <asp:Panel ID="userOrgPanel" runat="server" ></asp:Panel>
        </asp:Panel>
        <asp:Panel ID="wordsPanel" runat="server"></asp:Panel>
        <asp:Panel ID="informationPanel" runat="server">
            <asp:Label ID="operationinfoLabel" runat="server"></asp:Label>
        </asp:Panel>
        </fieldset>
        </ContentTemplate>
    </asp:UpdatePanel>