onclick='ShowViewPopup(this, "detail", null, null, <%#IIf(String.IsNullOrEmpty(Eval("CustomerNumber"))) %>';
Just get rid of
IIf, you do not seem to need it. I also recommend output the whole function call with C# code, makes it easier on quotes. So (formatted for better readability):
onclick='<%# "ShowViewPopup(this, \"detail\", null, null, " + String.IsNullOrEmpty(Eval("CustomerNumber")) + ")" %>'