Hello all, not too sure if I can do this or not but I have a datalist that i have populated with a series of dates, i also have placed a single textbox in the datalist under the date allowing to enter a value per date. Let’s say 12 days worth or date which can vary depending on a start date and a duration variable (like a drop down box with number values in it).
So back to the issue, Can I take to values per date within the datalist and submit them to the database (SQL Server)? For some reason I can't find any info is how to get the value of each dates textbox (seeing that every textbox is repeated per date and the textbox name is unique, how would I differentiate one from another?
Here is the code for the datalist
Any thoughts?
Thanks
TalenX
So back to the issue, Can I take to values per date within the datalist and submit them to the database (SQL Server)? For some reason I can't find any info is how to get the value of each dates textbox (seeing that every textbox is repeated per date and the textbox name is unique, how would I differentiate one from another?
Here is the code for the datalist
Code:
<form action="" runat="server" method="post">
<asp:DataList runat="server" id="DataList1"
Width="85%" Border="1"
HorizontalAlign="Center"
Font-Name="Verdana" CellPadding="1"
Font-Size="10pt"
RepeatColumns="14" >
<ItemTemplate>
<div align="center"><%# DataBinder.Eval(Container.DataItem, "Date_Key") %>
<br>
</div>
<asp:TextBox ID="fld_projectedsale" Columns="5" runat="server" /> </ItemTemplate>
<footertemplate> <asp:Button ID="btn_submit" Text="Insert" runat="server" /></footertemplate>
</asp:datalist>
</form>
Any thoughts?
Thanks
TalenX