Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 14th, 2004, 09:58 AM
mdelaney mdelaney is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 5 mdelaney User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Contact Page with Request.QueryString

Hi...

I'm new the world of dynamic webpages and I was told that
ASP was the easiest to learn. Generally speaking, I haven't
had a problem with it, mind you I'm only doing very very basic
things, until now.

I'm trying to create a page that lists all the people that work
within a specific department in the organization I'm involved
with. I've created a basic page that dynamically generates
a table that lists each department, which works fine. The
problem I have is when you click on a specific department
e.g. Administration, it doesn't display any contact information
just repeats the department name in all the table cells. An
example of what I'm trying to do is on the following website
address: http://www.bantafoods.com/contactus/departments.asp

I'm using plain ASP (not .NET), IIS 5.01, and DreamWeaver MX to
create this site

Any help would be appreciated

Reply With Quote
  #2  
Old October 14th, 2004, 05:12 PM
spungebob spungebob is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Dover
Posts: 128 spungebob User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 39 sec
Reputation Power: 5
need to see your code in order to help you!

You can't expect someone to figure out how to help if you don't show show the current code?



Reply With Quote
  #3  
Old October 15th, 2004, 02:12 AM
roughneck82 roughneck82 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Location: Tejas
Posts: 63 roughneck82 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 32 m 5 sec
Reputation Power: 4
I'd use either If..Then statements or Select Case

Reply With Quote
  #4  
Old October 18th, 2004, 11:59 AM
mdelaney mdelaney is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 5 mdelaney User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
<<A href="mailto:%@LANGUAGE="VBSCRIPT">%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/mands.asp" -->
<%
Dim Departments__MMColParam
Departments__MMColParam = "Administration"
If (Request.QueryString("Dept") <> "") Then
Departments__MMColParam = Request.QueryString("Dept")
End If
%>
<%
Dim Departments
Dim Departments_numRows

Set Departments = Server.CreateObject("ADODB.Recordset")
Departments.ActiveConnection = MM_mands_STRING
Departments.Source = "SELECT Name, Dept, Position, Address, City, Prov, Postal, Phone, Email, DeptName, DeptLink FROM contact, dept WHERE Dept = '" + Replace(Departments__MMColParam, "'", "''") + "' AND Dept = DeptName"
Departments.CursorType = 0
Departments.CursorLocation = 2
Departments.LockType = 1
Departments.Open()

Departments_numRows = 0
%>

There's my code so far

I'm at a stand-still from there, because I've got little to no programming/scripting knowledge in both VB, ASP, and HTML....

Reply With Quote
  #5  
Old October 20th, 2004, 10:04 AM
spungebob spungebob is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Dover
Posts: 128 spungebob User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 39 sec
Reputation Power: 5
Smile try this code

Departments_numRows = 0
Do while not departments.EOF
Departments_numRows = Departments_numRows + 1
Response.Write "Row=" & cstr(Departments_numRows) & " Dept=" & cstr(departments("dept").Value) & "<br>"
departments.MoveNext
Loop

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > Contact Page with Request.QueryString


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway