<asp:View ID="View1" runat="server">
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:freemoneytrialsConnectionString %>"
DeleteCommand="DELETE FROM [merchants] WHERE [merchants_id] = @merchants_id"
InsertCommand="INSERT INTO [merchants] ([merchants_affiliate_id], [merchants_name], [merchants_logo], [merchants_link], [merchants_active], [merchants_description], [merchants_short_description]) VALUES (@merchants_affiliate_id, @merchants_name, @merchants_logo, @merchants_link, @merchants_active, @merchants_description, @merchants_short_description)"
SelectCommand="SELECT * FROM [merchants]"
UpdateCommand="UPDATE [merchants] SET [merchants_affiliate_id] = @merchants_affiliate_id, [merchants_name] = @merchants_name, [merchants_logo] = @merchants_logo, [merchants_link] = @merchants_link, [merchants_active] = @merchants_active, [merchants_description] = @merchants_description, [merchants_short_description] = @merchants_short_description WHERE [merchants_id] = @merchants_id"
OnInserted="Update_ddl"
>
<DeleteParameters>
<asp:Parameter Name="merchants_id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="merchants_affiliate_id" Type="String" />
<asp:Parameter Name="merchants_name" Type="String" />
<asp:Parameter Name="merchants_logo" Type="String" />
<asp:Parameter Name="merchants_link" Type="String" />
<asp:Parameter Name="merchants_active" Type="Boolean" />
<asp:Parameter Name="merchants_description" Type="String" />
<asp:Parameter Name="merchants_short_description" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="merchants_affiliate_id" Type="String" />
<asp:Parameter Name="merchants_name" Type="String" />
<asp:Parameter Name="merchants_logo" Type="String" />
<asp:Parameter Name="merchants_link" Type="String" />
<asp:Parameter Name="merchants_active" Type="Boolean" />
<asp:Parameter Name="merchants_description" Type="String" />
<asp:Parameter Name="merchants_short_description" Type="String" />
<asp:Parameter Name="merchants_id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:ListView ID="ListView1" runat="server" DataKeyNames="merchants_id"
DataSourceID="SqlDataSource1"
InsertItemPosition="LastItem"
OnItemInserted="Update_ddl"
>
<!-- templates here -->
</asp:ListView>
</asp:View>
<asp:View ID="View2" runat="server">
<asp:ListView ID="ListView2" runat="server" DataKeyNames="offers_id"
DataSourceID="SqlDataSource2" InsertItemPosition="LastItem"
OnItemUpdating="test"
OnItemUpdated="updateCategoryIds"
OnItemInserted="insertCategoryIds">
<InsertItemTemplate>
<tr style="">
<td>
<!-- the DropDownList that needs to be refreshed -->
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceId="SqlDataSource1" DataTextField="merchants_name" DataValueField="merchants_id" enableviewstate="true" SelectedValue='<%# Bind("merchants_id")%>'>
</asp:DropDownList>
</td>
</tr>
</InsertItemTemplate>
</asp:ListView>
</asp:view>