<% 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 "propertieslist.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 [properties] WHERE [propertyID]=" & tkey Set rs = Server.CreateObject("ADODB.Recordset") rs.Open strsql, conn If rs.Eof Then Response.Clear Response.Redirect "propertieslist.asp" Else rs.MoveFirst End If ' Get the field contents x_propertyID = rs("propertyID") x_datelisted = rs("datelisted") x_propertyName = rs("propertyName") x_mls = rs("mls") x_price = rs("price") x_status = rs("status") x_image = rs("image") x_description = rs("description") x_link = rs("link") rs.Close Set rs = Nothing End Select %>

View TABLE: properties

Back to List

property ID  <% Response.Write x_propertyID %> 
datelisted  <% Response.Write x_datelisted %> 
property Name  <%= Replace(x_propertyName & "", vbLf, "
") %>
 
mls  <% Response.Write x_mls %> 
price  <% Response.Write x_price %> 
status  <% Response.Write x_status %> 
image  <% Response.Write x_image %> 
description  <%= Replace(x_description & "", vbLf, "
") %>
 
link  <% Response.Write x_link %>