473,385 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Search Functionality Dilemma

I need some input as to how the cleanest way to code the following. I
have a aspx search page with a datalist displaying the results. Above
the datalist are 2 textboxes and 2 dropdownlists.

The idea is that the end user can choose any combination of the 2
textboxes and 2 dropdownlists to narrow down the search critera.

Should I write one stored procedure for each of the possible
combinations (16 combinations) and call them depending on what the
user selects? Should I write a massive stored procedure with 16
combinations?

There must be a leaner way of doing this?

Any help is highly appreciated.

Thanks

Jun 26 '07 #1
2 1223
Ysgrifennodd Nightcrawler:
I need some input as to how the cleanest way to code the following. I
have a aspx search page with a datalist displaying the results. Above
the datalist are 2 textboxes and 2 dropdownlists.

The idea is that the end user can choose any combination of the 2
textboxes and 2 dropdownlists to narrow down the search critera.

Should I write one stored procedure for each of the possible
combinations (16 combinations) and call them depending on what the
user selects? Should I write a massive stored procedure with 16
combinations?

There must be a leaner way of doing this?

Any help is highly appreciated.

Thanks
Can't you pass in parameters, into your stored procedure?
Peter
Jun 26 '07 #2
Why would you need to do that? Clearly, each of the textboxes can only
have one value, so you would only need four parameters for your stored
procedure. Your stored procedure would then execute a query based on the
parameters.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Nightcrawler" <th************@gmail.comwrote in message
news:11**********************@w5g2000hsg.googlegro ups.com...
>I need some input as to how the cleanest way to code the following. I
have a aspx search page with a datalist displaying the results. Above
the datalist are 2 textboxes and 2 dropdownlists.

The idea is that the end user can choose any combination of the 2
textboxes and 2 dropdownlists to narrow down the search critera.

Should I write one stored procedure for each of the possible
combinations (16 combinations) and call them depending on what the
user selects? Should I write a massive stored procedure with 16
combinations?

There must be a leaner way of doing this?

Any help is highly appreciated.

Thanks
Jun 26 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John Davis | last post by:
I want to add a "quick search" functionality in ASP or ASP.NET page. I heard we can use Microsoft Indexing Service to accomplish the task, but not sure how to do it. Is this the correct approach??...
0
by: Robert Oschler | last post by:
I read a while back that MySQL will only use one index per query. (If this is not so, please tell me and point me to a doc that gives a good explanation of MySQL's current index usage policy). ...
0
by: Gman997 | last post by:
Hi all, Here is my dilemma which I bet others have faced. I have a datagrid written in C# which based upon user criteria will display anywhere from 6 to 18 columns of numbers which will be...
1
by: vvenk | last post by:
Hello: I have a Form (Form A) that has a datagrid. When the user chooses to find a value, I open up a second form (Form B) (not a dialog), wherein the user enters the search string, direction...
16
by: hzmonte | last post by:
Correct me if I am wrong, declaring formal parameters of functions as const, if they should not be/is not changed, has 2 benefits; 1. It tells the program that calls this function that the...
2
by: Tomas | last post by:
Hi, I am a VB.NET newbie that would like to know the best practise when working with objects and undo user changes to objects properties. Problem The system allows the user to change...
13
by: Vai2000 | last post by:
Hi All, Planning to call the same search API which windows Search uses for searching , when u launch with Ctrl+F,you have the flexibility to provide a containing text! VB/C# any thing would work...
9
by: jmartmem | last post by:
Greetings, Perhaps someone can help me resolve what I hope is a simple dilemma... I have one ASP page (TEST_RoadmapData_Search.asp) which contains two list/menus within a form, which, upon...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.