473,404 Members | 2,170 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,404 software developers and data experts.

need to add a 2nd dropdown search c# ASP.NET

ok...i have an existing html form that have a number of fields..one being a dropdown specialty list.
the form does a get to an aspx datagrid written in c# (i did not write this and i need to only modify it until i have time to redo the entire thing so please dont say its all wrong, i know lol)

the filter for the specialty is a loop statement using if...
Expand|Select|Wrap|Line Numbers
  1. if (Server.HtmlEncode(arr1[loop1])=="specialty")
  2.                             sWhere += "specialty  LIKE '%" + (arr2[loop2])+ "%' AND ";
  3.  
  4.                         if (Server.HtmlEncode(arr1[loop1])=="specialty2")
  5.                             sWhere += "specialty  LIKE '%" + (arr2[loop2])+ "%' AND ";
  6.  
the dropdown id's are specialty and specialty2
basically i need to change it so that if specialty2 is selected it will filter by both
wha ti have above works but if both are selected....instead of filtering by both..i get no results.
Mar 14 '08 #1
0 885

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: JP SIngh | last post by:
Hi All I just wondering if someone can suggest a solution to this tricky issue we have got. I have an asp form which allow our users to create a new record and save it to the database. On the...
3
by: Developerforum | last post by:
Hi, My customer is looking for a web control that allow them to perform speedy data entry. They wanted a dropdown list box which they can also key in the code directly (like a text box). I...
5
by: Gil | last post by:
Is there a way to tell if a combbox is in dropdown mode. I tried and if statement combobox.dropdown = true but i get an error. dropwndown function doesnt store if its true or false what i am...
6
by: assgar | last post by:
Hi I am trying to get data from a mysql database with php. These dynamic rows may have multiple prices between 1 and 5. I would like to use a drop dropdown to display these prices and allow...
3
by: groups2 | last post by:
When you press the down key while in an input field the default behavior for some event creates a dropdown of the previously input text. What event creates that behavior and how do I stop it ? ...
2
by: sabrinakr | last post by:
Hi All, I have spent a long time on this and still cant figure out whats wrong. I have recently started with javscript and my question is as follows: The page works fine but if the User...
11
by: tokcy | last post by:
Hi everyone, I am new in php and ajax, i am facing the prob while i click on element of first drop down then in second dropdown all element showl come from database. I mean i have three dropdown 1....
1
by: ghjk | last post by:
I have a drop down box and the test box for the search field. In there I user only dropdown box to search values from the DB. But now I want to pass text box value with dropdownbox value. How can I...
7
by: microsoftboy | last post by:
Hi, Using the following selection criteria, I am able to list the data from mysql db, but I would like to provide the following options for users: Select All Data, Select None. I am not sure if...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.