A:Having told him
B:Having been told him
C:Though he had been told
D:He was told
若直线ax+2y+1=0与直线x+y-2=0互相垂直,那么a的值等于( )