B
B. Chernick
Ok. Webforms project/VB/ASP.net 2.0
I'm trying to whip up a quickie demo and my basic programming model is to
display multiple records in a gridview and use that to select individual
records for editing in a DetailsView. I'm trying to keep this as simple as
possible. So I had this 'bright' idea.
The problem is this: In a particular table, my boss wants several related
fields displayed on the same line. So I made that line a template and
inserted a table with several bound fields, by editing the html directly.
(There's no VB code whatever in this screen... yet.) This arrangement works
fine as far as initial display and the data is still there when I go into
Edit mode. However when I click Update, all data, whether original or
entered, in any of those multiple field lines is lost. Data entered in
conventional non-template lines is saved.
Here's a sample of the raw aspx. Any suggestions?
<asp:Table ID="TableCAPEXsus" runat="server">
<asp:TableRow>
<asp:TableCell>
<asp:TextBox ID="txtCAPEXsus" runat="server"
Text='<%# Bind("CAPEXsus") %>'></asp:TextBox>
</asp:TableCell><asp:TableCell>
<asp:TextBox ID="txtCAPEXsus1"
runat="server" Text='<%# Bind("CAPEXsus1") %>'></asp:TextBox>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
I'm trying to whip up a quickie demo and my basic programming model is to
display multiple records in a gridview and use that to select individual
records for editing in a DetailsView. I'm trying to keep this as simple as
possible. So I had this 'bright' idea.
The problem is this: In a particular table, my boss wants several related
fields displayed on the same line. So I made that line a template and
inserted a table with several bound fields, by editing the html directly.
(There's no VB code whatever in this screen... yet.) This arrangement works
fine as far as initial display and the data is still there when I go into
Edit mode. However when I click Update, all data, whether original or
entered, in any of those multiple field lines is lost. Data entered in
conventional non-template lines is saved.
Here's a sample of the raw aspx. Any suggestions?
<asp:Table ID="TableCAPEXsus" runat="server">
<asp:TableRow>
<asp:TableCell>
<asp:TextBox ID="txtCAPEXsus" runat="server"
Text='<%# Bind("CAPEXsus") %>'></asp:TextBox>
</asp:TableCell><asp:TableCell>
<asp:TextBox ID="txtCAPEXsus1"
runat="server" Text='<%# Bind("CAPEXsus1") %>'></asp:TextBox>
</asp:TableCell>
</asp:TableRow>
</asp:Table>