function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SriramR14SriramR14 

Error: Unknown property 'List_Example_2.Student__c'


<apex:page controller="List_Example_2">
    <apex:form>
    <apex:pageblock title="Student" id="fm"    >
        
         
            <apex:pageblockbuttons location="top">
                <apex:commandbutton value="Add" action="{!Addme}" reRender="fm"/>
                <apex:commandbutton value="Clear" action="{!Clearme}" reRender="fm"/>
            </apex:pageblockbuttons>
       
        
        
                    <apex:pageblocksection columns="1">
                        <apex:inputtext value="{!stud.LastName__c}"/>
                        <apex:inputtext value="{!stud.FirstName__c}"/>
                        <apex:inputtext value="{!stud.Phone__c}"/>
                        <apex:inputtext value="{!stud.City__c}"/>
                        <apex:inputtext value="{!stud.Email__c}"/>
                    </apex:pageblocksection>
        
                     <apex:pageblocksection columns="1" rendered="{!Student__c.size>0}">
                     <apex:pageblocktable value="{!Student__c}" var="a">
                         <apex:column value="{!a.LastName__c}"/>
                         <apex:column value="{!a.FirstName__c}"/>
                         <apex:column value="{!a.Phone__c}"/>
                         <apex:column value="{!a.City__c}"/>
                         <apex:column value="{!a.Email__c}"/>
                     </apex:pageblocktable>   
                     </apex:pageblocksection>
              
        </apex:pageblock>
    </apex:form>
</apex:page>
Akshata ShahAkshata Shah
Please try this code

 <apex:pageblocksection columns="1" rendered="{!StudentList.size>0}">
                     <apex:pageblocktable value="{!StudentList}" var="a">
                         <apex:column value="{!a.LastName__c}"/>
                         <apex:column value="{!a.FirstName__c}"/>
                         <apex:column value="{!a.Phone__c}"/>
                         <apex:column value="{!a.City__c}"/>
                         <apex:column value="{!a.Email__c}"/>
                     </apex:pageblocktable>   
                     </apex:pageblocksection>

controller
public class List_Example_2{

public <Student__c>StudentList{get;set;}

public List_Example_2(){
     fetchStudent();
}
public void fetchStudent(){
       StudentList=[select LastName__c,FirstName__c,Phone__c,City__c,Email__c from Student__c];
}
}

Regards,
Akshata Shah
Arthur SimonsArthur Simons
Wow, for me this problem is new encountered, I just now got to the given program and don't understand how this could be solved, if someone can help me and clarify, I would be grateful.
Henry ConnHenry Conn
I usually turn to my friend who works in the IT industry as long as I am doing my studies often when such problems arise and when I don't know how to do something, I turn to this source https://edubirdie.com/do-my-homework which helps me with do my homework, Edubirdie has already helped me several times and always came up with correct and timely answers. I prefer to use this platform because it is relatively inexpensive and always available. Besides that, several friends recommended this one to me and now I am convinced that this one really is best.