hi
my team mate found the solution and i can believe it :-( i have spent 2 days serachin for a reason and the issue was that there was a single quote ' in the caught error which was kicking it out so the solution was the following
Response.Write("<script LANGUAGE=JavaScript type=""text/javascript"">")
Response.Write("alert('" & ex.Message.ToString.Replace("'", """") & "')")
Response.Write("</script>")
thanks for everyone who posted tho :-)