• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 262
  • Last Modified:

If Request Empty Request =

Hello,

Is this possible?

<% If Request("l") = "" Then
Request("l") = (RSMemberLocality.Fields.Item("Locality").Value)
End If%>

When I try it I get an error -

Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'Request'
/retainersurveyresults.asp, line 28

Thanks
0
garethtnash
Asked:
garethtnash
2 Solutions
 
pateljituCommented:
Request is Read-Only, I would suggest you assign the value of recordset to a variable and use that variable in your code.

<% If Request("l") = "" Then
somevariable = (RSMemberLocality.Fields.Item("Locality").Value)
End If%>
0
 
G_HCommented:
Agreed, maybe better written as:

<%
someVariable = Request("I")
if someVariable = "" then
  someVariable =  (RSMemberLocality.Fields.Item("Locality").Value)
end if

response.write someVariable

%>

GH
0
 
garethtnashAuthor Commented:
Thanks both
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now