tags:

views:

14

answers:

0

I'm trying to use ListView's EditItemTemplate to bind controls in a page. It displays but #Bind fails to update the controls. If anyone sees any problems in my code (below), please let me know.

<asp:LinqDataSource ID="srcProfile" ContextTypeName="[Data Context]" TableName="[Table Name]"
Where="UserID = guid(@UserID)" EnableUpdate="True" runat="server"> <WhereParameters>
    <asp:SessionParameter Name="UserID" SessionField="UserID" /> </WhereParameters> </asp:LinqDataSource> <asp:ListView ID="lsvProfile" DataSourceID="srcProfile" ItemPlaceholderID="itemContainer"
EditIndex="0" DataKeyNames="UserID" runat="server"> [snip] <EditItemTemplate>
    <asp:UpdatePanel ID="udpEFul" runat="server" Visible="true">
        <ContentTemplate>
            <div class="profile-content">
                <cc2:ful ID="fulE" runat="server" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <tr>
        <td colspan="3">
            <div class="profile-buttons">
                <asp:Button ID="btnEUpdate01" runat="server" CommandName="Update" TabIndex="170"
                    Text="Update" />
                <asp:Button ID="btnECancel01" runat="server" CommandName="Cancel" OnClick="btnCancel_Click"
                    TabIndex="175" Text="Cancel" />
            </div>
        </td>
    </tr>
    <tr>
        <td colspan="1">
            <table style="color: #999999;"> <asp:Panel ID="pnlEmail" Visible="true" runat="server">
    <div>
        <tr>
            <td colspan="1">
                <span class="label">
                    <asp:Label ID="lblEmail" Text="E-mail:" runat="server" />
                </span>
            </td>
            <td colspan="1">
                <span class="ctrl">
                    <asp:TextBox ID="Email" CausesValidation="true" EnableViewState="False" Font-Bold="false" Text='<%#Bind("Email")%>'
                        BackColor="#FFFFFF" Enabled="true" TabIndex="50" runat="server" />
                </span>
            </td>
            <td colspan="1">
                <span class="req">
                    <asp:Label ID="lblEmail_Req" Text="*" ForeColor="#FF0000" runat="server" />
                </span>
            </td>
            <td colspan="1">
                <span class="disp">
                    <asp:UpdatePanel ID="udpDisEmail" UpdateMode="Conditional" runat="server">
                        <ContentTemplate>
                            <asp:CheckBox ID="chkEmail" AutoPostBack="true" Checked='<%#Bind("Email_Disp") %>' Enabled="true" TabIndex="500"
                                Text="Display?" TextAlign="left" runat="server" />
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </span>
            </td>
        </tr>
    </div>
</asp:Panel>
            </table>
        </td>
        <td style="width: 30px;" />
    </tr>
    </table>
</EditItemTemplate>

related questions