G
Guest
New to 2.0, using code that works in 1.1, and all works well except cannot
get the text out of the textboxes for updating the database.
My template column looks like this:
<asp:TemplateColumn HeaderText="Notes"
ItemStyle-HorizontalAlign="Center">
<ItemStyle VerticalAlign="Top"></ItemStyle>
<ItemTemplate>
<%#DataBinder.Eval(Container.DataItem, "CarlileNotes")%>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox runat="server" id="txtNotes" Width="300"
MaxLength="1000" CssClass="clsBody" Text='<%#
Container.DataItem("CarlileNotes") %>' />
</EditItemTemplate>
</asp:TemplateColumn>
My code behind looks like this:
sNotes = CType(e.Item.FindControl("txtNotes"), TextBox).Text.Trim
It runs without errors but sNotes does not contain the text from the text
box.
Any help is appreciated.
get the text out of the textboxes for updating the database.
My template column looks like this:
<asp:TemplateColumn HeaderText="Notes"
ItemStyle-HorizontalAlign="Center">
<ItemStyle VerticalAlign="Top"></ItemStyle>
<ItemTemplate>
<%#DataBinder.Eval(Container.DataItem, "CarlileNotes")%>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox runat="server" id="txtNotes" Width="300"
MaxLength="1000" CssClass="clsBody" Text='<%#
Container.DataItem("CarlileNotes") %>' />
</EditItemTemplate>
</asp:TemplateColumn>
My code behind looks like this:
sNotes = CType(e.Item.FindControl("txtNotes"), TextBox).Text.Trim
It runs without errors but sNotes does not contain the text from the text
box.
Any help is appreciated.