I saw a piece of ASP code that looks as follows:
<% rs("Server.HTMLEncode(x)") %>
Since I doubt that the recordset has a field named “Server.HTMLEncode(x)” I was wondering if they meant to write:
<% Server.HTMLEncode(rs(x)) %>
Or if classic ASP does reflection and somehow interprets that string literal as a method call.
I used classic ASP for ten years, and I never encountered any kind of reflection. Based on my past experience, I would agree with you that they probably meant to write:
But, it still does not look correct. Did they mean to write out the value using Response.Write? I can’t tell without seeing more of the code.
Looks like bad coding to me.