G
Guest
I'm trying to load a DropDownList in a Gridview from a secondary
SqlDataSource but I get an exception complaining that the ControlParameter's
ControlId isn't found.
"Could not find control 'JoinDate' in ControlParameter 'JoinDate'."
<asp:BoundField DataField="JoinDate" HeaderText="Joined"
SortExpression="JoinDate" />
<asp:TemplateField HeaderText="Dates">
<ItemTemplate>
<asp
ropDownList ID="RideDatesDropDownList" runat="server"
OnDataBound="ShowHideDatesDDL"
DataSourceId="RideDatesSqlDataSource" DataTextField="RideDate"
DataValueField="RideDate"
DataTextFormatString="{0:MMM yyyy}" CssClass="waDropDownList">
</asp
ropDownList>
<asp:SqlDataSource ID="RideDatesSqlDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:myDB %>"
ProviderName="System.Data.SqlClient"
SelectCommand="GetCurrentRidesTaken_desc"
SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:ControlParameter ControlID="RegistrantIdLabel"
Name="RegistrantId" Type="Int32" />
<asp:ControlParameter ControlID="JoinDate" Name="JoinDate"
Type="DateTime" />
</SelectParameters>
</asp:SqlDataSource>
</ItemTemplate>
</asp:TemplateField>
Any illumination would be appreciated, I'm stuck
SqlDataSource but I get an exception complaining that the ControlParameter's
ControlId isn't found.
"Could not find control 'JoinDate' in ControlParameter 'JoinDate'."
<asp:BoundField DataField="JoinDate" HeaderText="Joined"
SortExpression="JoinDate" />
<asp:TemplateField HeaderText="Dates">
<ItemTemplate>
<asp
OnDataBound="ShowHideDatesDDL"
DataSourceId="RideDatesSqlDataSource" DataTextField="RideDate"
DataValueField="RideDate"
DataTextFormatString="{0:MMM yyyy}" CssClass="waDropDownList">
</asp
<asp:SqlDataSource ID="RideDatesSqlDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:myDB %>"
ProviderName="System.Data.SqlClient"
SelectCommand="GetCurrentRidesTaken_desc"
SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:ControlParameter ControlID="RegistrantIdLabel"
Name="RegistrantId" Type="Int32" />
<asp:ControlParameter ControlID="JoinDate" Name="JoinDate"
Type="DateTime" />
</SelectParameters>
</asp:SqlDataSource>
</ItemTemplate>
</asp:TemplateField>
Any illumination would be appreciated, I'm stuck