Server.Transfer exception in master page



In my master page I have a textbox and button to search the site. In the click event of the button I just want to pass all the form data across to the search page, so I have:

Private Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click
Server.Transfer("~/Search.aspx")
End Sub

Which works fine when the event is fired from a page that is in the root of the web application, but when it is called from a subdirectory I get:

"Cannot use a leading .. to exit above the top directory"

I've seen a few references to this on the net, but no solutions. Does anyone know what's wrong?

.