jrthor2
08-02-2007, 12:34 PM
I have 1 page that I want to display a persons biography information based on who the user clicks on from the previous page. Right now, I have an id assigned to each link, which tells the bio page which data to show. The data I have is not stored in any database or anything. I have the data in the page, and then a switch statement based on the id to show the correct data. My question, is there a better way to do this? The code will be very long with 17+ bio's. Below is the code I have so far, just for one person, but will grow.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
Dim id
Dim image
Dim text
Dim mgrName
id = Request.QueryString("id")
Select Case id
Case 1
image = "Fname_Lname.jpg"
mgrName = "Fname Lname"
text = "<p>The persons bio here</p><p>More bio information</p>"
Case 2
image = ""
mgrName = ""
text = ""
Case 3
image = ""
mgrName = ""
text = ""
Case 4
image = ""
mgrName = ""
text = ""
Case 5
image = ""
mgrName = ""
text = ""
Case 6
image = ""
mgrName = ""
text = ""
Case 7
image = ""
mgrName = ""
text = ""
Case 8
image = ""
mgrName = ""
text = ""
Case 9
image = ""
mgrName = ""
text = ""
Case 10
image = ""
mgrName = ""
text = ""
Case 11
image = ""
mgrName = ""
text = ""
Case 12
image = ""
mgrName = ""
text = ""
Case 13
image = ""
mgrName = ""
text = ""
Case 14
image = ""
mgrName = ""
text = ""
Case 15
image = ""
mgrName = ""
text = ""
Case 16
image = ""
mgrName = ""
text = ""
Case 17
image = ""
mgrName = ""
text = ""
Case Else
End Select
%>
<html>
<head>
<title>Distribution Centers</title>
<link media="screen" title="main" rel="stylesheet" type="text/css" href="/distdocs/css/main.css" />
</head>
<body>
<div id="wrapper">
<div class="leftCol">
<img src="images/mgrs/<%=image%>" alt="bio" width="250" height="188" />
<p class="mgrName">
<%=mgrName%>
</p>
</div>
<div class="rightCol">
<%=text%>
</div>
</div>
</body>
</html>
Thanks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
Dim id
Dim image
Dim text
Dim mgrName
id = Request.QueryString("id")
Select Case id
Case 1
image = "Fname_Lname.jpg"
mgrName = "Fname Lname"
text = "<p>The persons bio here</p><p>More bio information</p>"
Case 2
image = ""
mgrName = ""
text = ""
Case 3
image = ""
mgrName = ""
text = ""
Case 4
image = ""
mgrName = ""
text = ""
Case 5
image = ""
mgrName = ""
text = ""
Case 6
image = ""
mgrName = ""
text = ""
Case 7
image = ""
mgrName = ""
text = ""
Case 8
image = ""
mgrName = ""
text = ""
Case 9
image = ""
mgrName = ""
text = ""
Case 10
image = ""
mgrName = ""
text = ""
Case 11
image = ""
mgrName = ""
text = ""
Case 12
image = ""
mgrName = ""
text = ""
Case 13
image = ""
mgrName = ""
text = ""
Case 14
image = ""
mgrName = ""
text = ""
Case 15
image = ""
mgrName = ""
text = ""
Case 16
image = ""
mgrName = ""
text = ""
Case 17
image = ""
mgrName = ""
text = ""
Case Else
End Select
%>
<html>
<head>
<title>Distribution Centers</title>
<link media="screen" title="main" rel="stylesheet" type="text/css" href="/distdocs/css/main.css" />
</head>
<body>
<div id="wrapper">
<div class="leftCol">
<img src="images/mgrs/<%=image%>" alt="bio" width="250" height="188" />
<p class="mgrName">
<%=mgrName%>
</p>
</div>
<div class="rightCol">
<%=text%>
</div>
</div>
</body>
</html>
Thanks