[SalesForce] Render button based on condition

I want to render/enable a command button based on a rollupsummary field value. If a rollupsummary field evalues to 0 enable it else keep it disabled.

Following is the code i am trying to achieve this functionality

enter image description here

public with sharing class test 
{ 
    public Account acc{get;set;}

    public test(){
       acc = [SELECT No_of_App__c   FROM Account];
    }
}

No able to render/enable diable the button

Best Answer

Your code should work properly. You are missing "" in rendered tag.

Try this code once

rendered="{!If(acc.No_Of_App__C = 0 ,True,False)}"