Forums

This topic is locked

Help needed with conditional area

Posted 11 Feb 2004 20:10:13
1
has voted
11 Feb 2004 20:10:13 Zain Magsi posted:
Hi,

I have a set of three asp pages that work like this:
Page 1: User selects a parent category form a dropdown menu
Page 2: The info is passed to page two and the subcategories associated with the selected parent category are displayed as hyperlinks.
Page 3: Selecting a Subcategory from page 2 takes the user to page three where the user is required to enter a zipcode to search for contractors associated with the chosen subcategory. The results of the search are then displayed on the same page.

See this in action at: www.your-personalassistant.com/prototalk/index.asp

Download the zipped app at:
www.your-personalassistant.com/prototalk/prototalk.zip

<b>This is what I need help with:</b>

I need to modify page three to display its results based on a condition as described below.

The database table for the subcategories (ServicesChild) has a column called "DisplayOptions" in Text Format.

I want page three to display the details of the Contractors only if that subcategory's "DisplayOptions" field is set to "Yes"

I am open to any alternative options if mine doesnt make sense.

You help is appreciated.

Best regards,

Zain

Zain Magsi

Replies

Replied 12 Feb 2004 09:02:50
12 Feb 2004 09:02:50 Dave Clarke replied:
You don't necessarily need a conditional region for this, you just need to incorporate it your SQL for the recordset, stick this on the end

SELECT Contractors FROM blah blah blah WHERE blah blah <b>AND DisplayOptions = 'Yes'</b>

If there is a chance that this recordset would be empty (i.e all contractors displayoptions are set to 'No' then you would need a conditional region on the page that displays the results.

&lt;% If Not Recordset1.EOF Or Not Recordset1.BOF Then %&gt;

your results

&lt;% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %&gt;

Dave


ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome

Reply to this topic