Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Searching with codebehind and object datasource

Posted on 2006-06-30
2
Medium Priority
?
329 Views
Last Modified: 2012-05-05
Hello experts,

I am binding a datalist control to an object datasource...

However, users need to be able to filter their search once the page loads.

I have 7 fields of data they can use to file, four dropdown lists, two checkboxes and a textfield....

Once they have selected all their filter search criteria (which could be one all or anything in between), I need to perform the search and rebing the new result to the datalist control.


1. How do I go about doing this?
2. Is this at all possible to do whilst untilisng an object datasource...
3.If so, how do I go about it
4. do i use the form field criteria of the object datasource and if so, how does that work, baring in mind that am using a datalist control


Many Thanks,

Clara
           
 
0
Comment
Question by:claracruz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Author Comment

by:claracruz
ID: 17017252
so I have the required <form></form> tags that encapsulates my form fields for the search and my datalist control, does this mean that once a user makes all their selections and clicks submit, then it will do the required query.

If so, how do I configure my form to do what's required.
0
 
LVL 25

Accepted Solution

by:
dstanley9 earned 2000 total points
ID: 17017733
If you're using an ObjectDataSource, you should add your filter parameters as inputs to your SELECT command then do the filtering within the data source.  Of course, you should allow for NULLs where possible (use an unrealistic value for value types like -1 for ints to represent no selection).  Then you can tie the form controls to those input variables and it will all be taken care of behind the scenes.  
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question