I've got some debug msgs (written via Response.Write()) that I can see when I do a "View Source" like so (within VB code):
currentYear = Year(Now)
SQLString = "Select NewBiz from MasterUnitsprojSales where CYear = " & currentYear & " and Unit = '" & Unit & "'"
adoRS = New ADODB.Recordset
adoRS.Open(SQLString, adoCon)
IsNewBusiness = TRUE 'default (if record not found)
Category = "New Business"
If Not adoRS.EOF Then
IsNewBusiness = adoRS.Fields.Item(0).Value <> 0
if Not IsNewBusiness
Category = "Existing Business"
End If
Response.Write("<!-- IsNewBusiness after NOT EOF assignment = " & CStr(IsNewBusiness) & "-->")
End If
adoRS.Close()
-and (within hmtl):
<% Response.Write("<!-- Is New Biz = " & IsNewBusiness & "-->") %>
I can see these messages when I go to the page and "View Source"
But I have other similar instances that are not being written out, such as:
If Request.Form.Item("Action") = "Save" Then
Response.Write("<!-- Made it into the Action =Save block -->")
. . .
I know this block is bring reached, because the logic in it is taking place (database inserts).
Why would the Response.Write() not always work?