Your controls get a different ID client side when using a master page. Just view source and you can see what the client IDs are.
You can also set your client ids in JavaScript by using this syntax:
<![CDATA[<%= uploadResult.ClientID %>]]>
Or you can build it all through C#. I suggest using the first option.