Data Entry from Repeater
I have a Student_ID(TextBox)and Repeater with Activity_ID(Label) and Score (DropDownList). The repeater show the labels and dropdowns as they should look. But after data entry is done I need it to input 34 seperate records into a with the Student_ID always the same and Activity_ID(is incremented 1 to 34) and the Score selected dropdown. I don't know if need to add these to collection or can use FormParameters. Current code listed below:
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:DropDownList ID="DDL_Collection" runat="server" DataSourceID="SqlDS_Collection"
DataTextField="Collection_Period" DataValueField="Collection_ID">
</asp:DropDownList><br />
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDS_Activities">
<ItemTemplate>
<table runat=server>
<tr>
<td width=100>
<%#Eval("ActivityDescription")%>
</td>
<td>
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDS_Score" DataTextField="Score"
DataValueField="Scored_ID">
</asp:DropDownList>
</td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="SqlDS_Activities" runat="server" ConnectionString="<%$ ConnectionStrings:WorkSamplingConnectionString1 %>"
SelectCommand="SELECT [ActivityDescription], [Activities_ID] FROM [tblActivities]">
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDS_Score" runat="server" ConnectionString="<%$ ConnectionStrings:WorkSamplingConnectionString1 %>"
SelectCommand="SELECT [Scored_ID], [Score] FROM [tblScore]">
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDS_Collection" runat="server" ConnectionString="<%$ ConnectionStrings:WorkSamplingConnectionString1 %>"
SelectCommand="SELECT Collection_ID, Collection_Period FROM tblCollection WHERE (DataEntryAvailable = 1)">
</asp:SqlDataSource>
</asp:Content>
|