Hello,
here is my problem I am trying to pass a variable from one page to another using a string in the URL and nothing.
Here is the code:
================================
'response.write("TESTING: " & fpTable)
END IF
END SUB
SUB GetAgent(strIn)
IF TRIM(strIn) <> "" THEN
SET NewConn=Server.CreateObject("ADODB.Connection")
NewConn = "DSN=Premier;PW=;"
set rsAgent=Server.CreateObject("ADODB.recordset")
agentSQL = "SELECT * FROM ASSOCIATES WHERE AgentStatus='Active' AND Last_Name = '" & strIn & "';"
rsAgent.Open agentSQL, NewConn
IF NOT rsAgent.EOF AND NOT rsAgent.BOF THEN
response.write "<table width='100%' cellpadding='3' cellspacing='0' border='0'>"
IF Trim(rsAgent("Picture")) <> "" AND NOT IsNull(rsAgent("Picture")) THEN
strPic = "<a href='agent.asp?aid=" & Trim(rsAgent("LAID")) & "&agent=" & Trim(rsAgent("Last_Name")) & "'><img src='/MultiMedia/agents/"&SERVER.URLENCODE(Trim(lcase(rsAgent("Picture"))))&"' width='100' border='0'></a>"
ELSE
strPic = "<a href='agent.asp?aid=" & Trim(rsAgent("LAID")) & "&agent=" & Trim(rsAgent("Last_Name")) & "'><img src='/images/premier/Search/NoAgent.jpg' width='100' border='0'></a>"
END IF
response.write "<tr class='resultsCopy'><td valign='top' align='left' rowspan='7' height='10'>" & strPic & "</td>"
response.write "<td nowrap valign='top'><b><a class='dynamiclinks1' href='agent.asp?aid=" & Trim(rsAgent("LAID")) & "&agent=" & Trim(rsAgent("Last_Name")) & "'>" & Trim(rsAgent("Listing_Associate")) & "</a></b>"
response.write "<br>"
IF Trim(lcase(rsAgent("Title"))) = "realtor" THEN
response.write "Sales Associate/REALTOR<sup><font size='1'>®</font></sup>"
ELSE
response.write Trim(rsAgent("Title"))
END IF
If NOT IsNULL(rsAgent("Address1")) THEN Response.Write("<BR>" & TRIM(rsAgent("Address1")) & "")
If NOT IsNULL(rsAgent("Address2")) THEN Response.Write("<BR>" & TRIM(rsAgent("Address2")) & "")
If NOT IsNULL(rsAgent("City")) THEN Response.Write("<BR>" & TRIM(rsAgent("City")) & "")
If NOT IsNULL(rsAgent("State")) THEN Response.Write(", " & TRIM(rsAgent("State")) & "")
If NOT IsNULL(rsAgent("Zip")) THEN Response.Write(" " & TRIM(rsAgent("Zip")) & "")
response.write("<br>")
If NOT IsNULL(rsAgent("phoneNumber1")) THEN Response.Write("<br>Phone: " & TRIM(rsAgent("phoneNumber1")) & "")
If NOT IsNULL(rsAgent("fax1")) THEN Response.Write("<br>Fax: " & TRIM(rsAgent("fax1")) & "")
If NOT IsNULL(rsAgent("email")) THEN Response.Write("<br><a href='mailto:" & TRIM(rsAgent("email")) & "'>Email</a>")
Dim AgentEmail
AgentEmail = CStr(rsAgent("email"))
Response.Write(AgentEmail)
response.write "</td></tr></table>"
END IF
rsAgent.close
SET rsAgent = NOTHING
SET NewConn = NOTHING
ELSE
EXIT SUB
END IF
strPic = ""
strIn = ""
END SUB
%>=======================
I need to pass the CStr(rsAgent("email")) to the next page in this link.
==========================
<a href="contactustest1.asp?mls=<%=varMLS%>&LID=<%=varLID%> &Associate=<%=varAssociate%>&AgentEmail=<%=AgentEmail%>"><span class="style5">Request Additional Information</span></a>
+++++++++++++++++++++++++++++++++++++++++
Any Ideas
here is my problem I am trying to pass a variable from one page to another using a string in the URL and nothing.
Here is the code:
================================
'response.write("TESTING: " & fpTable)
END IF
END SUB
SUB GetAgent(strIn)
IF TRIM(strIn) <> "" THEN
SET NewConn=Server.CreateObject("ADODB.Connection")
NewConn = "DSN=Premier;PW=;"
set rsAgent=Server.CreateObject("ADODB.recordset")
agentSQL = "SELECT * FROM ASSOCIATES WHERE AgentStatus='Active' AND Last_Name = '" & strIn & "';"
rsAgent.Open agentSQL, NewConn
IF NOT rsAgent.EOF AND NOT rsAgent.BOF THEN
response.write "<table width='100%' cellpadding='3' cellspacing='0' border='0'>"
IF Trim(rsAgent("Picture")) <> "" AND NOT IsNull(rsAgent("Picture")) THEN
strPic = "<a href='agent.asp?aid=" & Trim(rsAgent("LAID")) & "&agent=" & Trim(rsAgent("Last_Name")) & "'><img src='/MultiMedia/agents/"&SERVER.URLENCODE(Trim(lcase(rsAgent("Picture"))))&"' width='100' border='0'></a>"
ELSE
strPic = "<a href='agent.asp?aid=" & Trim(rsAgent("LAID")) & "&agent=" & Trim(rsAgent("Last_Name")) & "'><img src='/images/premier/Search/NoAgent.jpg' width='100' border='0'></a>"
END IF
response.write "<tr class='resultsCopy'><td valign='top' align='left' rowspan='7' height='10'>" & strPic & "</td>"
response.write "<td nowrap valign='top'><b><a class='dynamiclinks1' href='agent.asp?aid=" & Trim(rsAgent("LAID")) & "&agent=" & Trim(rsAgent("Last_Name")) & "'>" & Trim(rsAgent("Listing_Associate")) & "</a></b>"
response.write "<br>"
IF Trim(lcase(rsAgent("Title"))) = "realtor" THEN
response.write "Sales Associate/REALTOR<sup><font size='1'>®</font></sup>"
ELSE
response.write Trim(rsAgent("Title"))
END IF
If NOT IsNULL(rsAgent("Address1")) THEN Response.Write("<BR>" & TRIM(rsAgent("Address1")) & "")
If NOT IsNULL(rsAgent("Address2")) THEN Response.Write("<BR>" & TRIM(rsAgent("Address2")) & "")
If NOT IsNULL(rsAgent("City")) THEN Response.Write("<BR>" & TRIM(rsAgent("City")) & "")
If NOT IsNULL(rsAgent("State")) THEN Response.Write(", " & TRIM(rsAgent("State")) & "")
If NOT IsNULL(rsAgent("Zip")) THEN Response.Write(" " & TRIM(rsAgent("Zip")) & "")
response.write("<br>")
If NOT IsNULL(rsAgent("phoneNumber1")) THEN Response.Write("<br>Phone: " & TRIM(rsAgent("phoneNumber1")) & "")
If NOT IsNULL(rsAgent("fax1")) THEN Response.Write("<br>Fax: " & TRIM(rsAgent("fax1")) & "")
If NOT IsNULL(rsAgent("email")) THEN Response.Write("<br><a href='mailto:" & TRIM(rsAgent("email")) & "'>Email</a>")
Dim AgentEmail
AgentEmail = CStr(rsAgent("email"))
Response.Write(AgentEmail)
response.write "</td></tr></table>"
END IF
rsAgent.close
SET rsAgent = NOTHING
SET NewConn = NOTHING
ELSE
EXIT SUB
END IF
strPic = ""
strIn = ""
END SUB
%>=======================
I need to pass the CStr(rsAgent("email")) to the next page in this link.
==========================
<a href="contactustest1.asp?mls=<%=varMLS%>&LID=<%=varLID%> &Associate=<%=varAssociate%>&AgentEmail=<%=AgentEmail%>"><span class="style5">Request Additional Information</span></a>
+++++++++++++++++++++++++++++++++++++++++
Any Ideas