Suppose that $A$ and $B$ are topological spaces homotopy equivalent to finite cell complexes, and let $B^A = \mathrm{maps}(A,B)$ denote the space of maps from $A$ to $B$. Is it there a formula for the Euler characteristic $\chi(B^A)$ of this mapping space in terms of, say, the Euler characteristics of $A$ and $B$ (or similar not-too-difficult data, like the Betti numbers)? I think that if $\chi(B^A)$ were $\chi(B)^{\chi(A)}$, then Wikipedia would have said so, and I would have known about it.
I care most about the case when $B$ is a manifold and $A$ is a surface, which is fairly specific, so I will accept answers that demand good behavior of $A$ and/or $B$.