I have a debug msgs (written via Response.Write ()) that I can see when I do "View Source", like this (in 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("") End If adoRS.Close()
- and (inside 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 recorded, for example:
If Request.Form.Item("Action") = "Save" Then Response.Write("") . . .
I know that this block is reached because the logic in it happens (inserts the database).
Why doesn't Response.Write () always work?
B. Clay Shannon
source share