DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2006

    dropdown data issue within a repeater

    I have a repeater where the data is filtered by a param in the querystring. In the repeater I have a dropdown that needs to only show the data based upon the filter I set up in the datasource. I have a section below the dropdown where I can hardcode the filter param (item_id) but I need that hardcoded part to dynamically pass in the current items value. Thanks for any assistance

    <!-- Repeater -->
    <asp:Repeater ID="QueryStringRepeater" runat="server" DataSourceID="CategoryFilterbyQueryStringObjectDataSource">
    <!-- Dropdown -->
    <asp:DropDownList ID="SizeDropDownList" DataValueField="size" runat="server" DataSourceID="SizeFilterSqlDataSource">
    <%SizeFilterSqlDataSource.SelectParameters["item_id"].DefaultValue = "2"; %>

    <!-- Here are my datasources-->

    <asp:ObjectDataSource ID="CategoryFilterObjectDataSource" runat="server"
    SelectMethod="GetSaleItemsbyCategory" TypeName="categoryfilterTableAdapters.saleitemsTableAdapter" OldValuesParameterFormatString="original_{0}">
    <asp:controlParameter ControlID="categoryDropDown" Name="category" PropertyName="SelectedValue" Type="String" />
    <asp:ObjectDataSource ID="CategoryFilterbyQueryStringObjectDataSource" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetSaleItemsbyCategory"
    <asp:QueryStringParameter Name="category" QueryStringField="category" Type="String" DefaultValue="apparel" />
    <asp:SqlDataSource ID="SizeFilterSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
    SelectCommand="SELECT sizes.size FROM saleitems INNER JOIN size_trans ON saleitems.item_id = size_trans.item_id INNER JOIN sizes ON size_trans.size_id = sizes.size_id WHERE (saleitems.item_id = @item_id)">
    <asp:Parameter DefaultValue="1" Name="item_id" />

  2. #2
    Join Date
    Nov 2006
    Is there no one that can give any ideas on this? Do I need to build out some function or is there a simple way to grab the index of the dataset to pass to the dropdown????

Similar Threads

  1. Dropdown Issue
    By saikiran_kris in forum Java
    Replies: 0
    Last Post: 03-14-2006, 01:21 PM
  2. Hailstorm and the Trust Issue
    By VBWyrde in forum Security
    Replies: 0
    Last Post: 07-13-2001, 10:49 AM
  3. Data Junction Announces XML Junction 7.51
    By Tim Frost in forum xml.announcements
    Replies: 0
    Last Post: 04-02-2001, 10:53 AM
  4. Complex Data Consumer Data Aware Classes
    By Desmond Cassidy in forum authorevents.kurata
    Replies: 3
    Last Post: 04-19-2000, 03:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.