<% If Session("project1_status") <> "login" Then Response.Redirect "login.asp" %> <% Response.expires = 0 Response.expiresabsolute = Now() - 1 Response.addHeader "pragma", "no-cache" Response.addHeader "cache-control", "private" Response.CacheControl = "no-cache" %> <% Response.Buffer = True key = Request.Querystring("key") If key = "" Or IsNull(key) Then key = Request.Form("key") If key = "" Or IsNull(key) Then Response.Redirect "contactslist.asp" ' Get action a = Request.Form("a") If a = "" Or IsNull(a) Then a = "I" ' Display with input box End If ' Open Connection to the database Set conn = Server.CreateObject("ADODB.Connection") conn.Open xDb_Conn_Str Select Case a Case "I": ' Get a record to display tkey = "" & key & "" strsql = "SELECT * FROM [contacts] WHERE [contactID]=" & tkey Set rs = Server.CreateObject("ADODB.Recordset") rs.Open strsql, conn If rs.Eof Then Response.Clear Response.Redirect "contactslist.asp" Else rs.MoveFirst End If ' Get the field contents x_contactID = rs("contactID") x_datestamp = rs("datestamp") x_inquirytype = rs("inquirytype") x_other = rs("other") x_timeframe = rs("timeframe") x_name = rs("name") x_street = rs("street") x_city = rs("city") x_state = rs("state") x_zip = rs("zip") x_daytimephone = rs("daytimephone") x_eveningphone = rs("eveningphone") x_email = rs("email") x_besttimetocontact = rs("besttimetocontact") x_comments = rs("comments") x_notes = rs("notes") rs.Close Set rs = Nothing End Select %>

View TABLE: contacts

Back to List

contact ID  <% Response.Write x_contactID %> 
datestamp  <% Response.Write x_datestamp %> 
Type of Inquiry  <% Response.Write x_inquirytype %> 
Other Type of Inquiry  <%= Replace(x_other & "", vbLf, "
") %>
 
Proposed Time Frame  <% Response.Write x_timeframe %> 
Name  <% Response.Write x_name %> 
Street  <% Response.Write x_street %> 
City  <% Response.Write x_city %> 
State  <% Response.Write x_state %> 
Zip  <% Response.Write x_zip %> 
Daytime Telephone  <% Response.Write x_daytimephone %> 
Evening Telephone  <% Response.Write x_eveningphone %> 
E-Mail  <% Response.Write x_email %> 
Best Time to Contact  <% Response.Write x_besttimetocontact %> 
Comments  <%= Replace(x_comments & "", vbLf, "
") %>
 
notes  <%= Replace(x_notes & "", vbLf, "
") %>