Mira, no puedes hacer un redirect cuando yá se ha abierto el html.
Debes ponerlo antes del tag <html> si se ha de redireccionar.
Y la sintaxis correcta sería esta
<%if Rs.RecordCount=1 then
Response.Redirect "detalle.asp?num=" & rs("n_e")
end if%>
Pruebalo y dime qué tal