I am using a datalist to display one entry in Access DB.
I want to enter new values into the textboxes on datalist and hit a submit button to insert new record in DB
I can do this when with the following code
strInsert = "INSERT INTO Bookings (StartDate, NoWeeks, Available) VALUES ( '09/09/1999', '3', '1')"
But I want to read the values from the asp text boxes.
Below is the asp textbox entries in the HTML on the page
<asp:TextBox id="tbstartDate" Text='<%# DataBinder.Eval(Container.DataItem, "StartDate") %>' Font-Size="Medium" runat="server" Width="73px" Font-Bold="True"></asp:TextBox>
<asp:TextBox id="tbNoWeeks" Text='<%# DataBinder.Eval(Container.DataItem, "NoWeeks") %>' Font-Size="Medium" runat="server" Width="73px" Font-Bold="True"></asp:TextBox>
<asp:TextBox id="tbAvailable" Text='<%# DataBinder.Eval(Container.DataItem, "Available") %>' Font-Size="Medium" runat="server" Width="73px" Font-Bold="True"></asp:TextBox>
How can I read the values entered into the textboxes into the 'INSERT' statement
I want to enter new values into the textboxes on datalist and hit a submit button to insert new record in DB
I can do this when with the following code
strInsert = "INSERT INTO Bookings (StartDate, NoWeeks, Available) VALUES ( '09/09/1999', '3', '1')"
But I want to read the values from the asp text boxes.
Below is the asp textbox entries in the HTML on the page
<asp:TextBox id="tbstartDate" Text='<%# DataBinder.Eval(Container.DataItem, "StartDate") %>' Font-Size="Medium" runat="server" Width="73px" Font-Bold="True"></asp:TextBox>
<asp:TextBox id="tbNoWeeks" Text='<%# DataBinder.Eval(Container.DataItem, "NoWeeks") %>' Font-Size="Medium" runat="server" Width="73px" Font-Bold="True"></asp:TextBox>
<asp:TextBox id="tbAvailable" Text='<%# DataBinder.Eval(Container.DataItem, "Available") %>' Font-Size="Medium" runat="server" Width="73px" Font-Bold="True"></asp:TextBox>
How can I read the values entered into the textboxes into the 'INSERT' statement