3 Replies - 3253 Views - Last Post: 07 May 2011 - 04:59 PM Rate Topic: -----

#1 heythere582  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 19-February 10

filtering Data with a drop down list

Posted 07 May 2011 - 07:13 AM

hey guys, hows it going.

so i am working on a project,

i have a database that we are display to the end user, well we have assigned categories to the data so if the article has "cats" in it, its now under the categories list,

we used a where statement and that filtered perfectly. so now what i am trying to do is, we bound this drop down list to the data source, and it pull all of our categories just fine, now we are trying to filter it out, so i guess what i am asking is,

how would i filter the data base when they select "dogs" only articles that are categorized as
"dogs" come up. i am new the the asp.net dev and was told to tackle this on my own :) so if i can get this, i will be one happy camper :)

Thanks for any help guys

i will be checking in and out. thanks guys

Is This A Good Question/Topic? 0
  • +

Replies To: filtering Data with a drop down list

#2 BrairMoss  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 15
  • View blog
  • Posts: 81
  • Joined: 13-April 10

Re: filtering Data with a drop down list

Posted 07 May 2011 - 08:43 AM

You could take a look at the FilterExpression method of the DataSource or look into using AJAX update panels and refreshing every time.
Was This Post Helpful? 0
  • +
  • -

#3 Nakor  Icon User is offline

  • Professional Lurker
  • member icon

Reputation: 445
  • View blog
  • Posts: 1,501
  • Joined: 28-April 09

Re: filtering Data with a drop down list

Posted 07 May 2011 - 12:41 PM

you're not providing enough information for anyone to do anything but guess. Right now we have no idea how you're populating you're DropDownList. There may be a different answer depending on if you're using a SqlDataSource, LinqDataSource, EntityDataSource or ObjectDataSource. You could also not be using a datasource and be populating the drop down in the code behind (though you did specify you were using a "data source" in this instance). Please provide us the code you're using so that we can give you the most accurate information without wasting a bunch of time making guesses.
Was This Post Helpful? 0
  • +
  • -

#4 heythere582  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 19-February 10

Re: filtering Data with a drop down list

Posted 07 May 2011 - 04:59 PM

[quote]
we used a where statement and that filtered perfectly. so now what i am trying to do is, we bound this drop down list to the data source, and it pull all of our categories just fine, now we are trying to filter it out, so i guess what i am asking is,

[/quote

im using sql datasource to populate the drop down.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1