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

how to display the list of records in a vf page?



  Iam having bad coding experience Pls help me in coding.How to display list of records in a visual force page?can anybody help me?

Laxman RaoLaxman Rao

If you want to display list of records you can use





Refer this :


try this:

<apex:page controller="example4">
<apex:pageBlock >
<apex:pageBlockSection title="Page Block Table">
<apex:pageBlockTable value="{!accs}" var="a">
<apex:column value="{!a.Name}"/>
</apex:pageBlock >

public with sharing class example4 {

public list<Account> accs {get;set;}

public example4() {
accs = [Select Name From Account Limit 100];


Hi laxman thank you for reply.I want controller also mean controller code can u send me?


Thanku for reply laxman i want all the fields display in vf page by using for loop can we display ?if it posible can u send me the controler by using for loop.