| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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?
![]() |
|
#3
|
|||
|
|||
|
I'd use either If..Then statements or Select Case
|
|
#4
|
|||
|
|||
|
<<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.... |
|
#5
|
|||
|
|||
|
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 |
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > Contact Page with Request.QueryString |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|