+ Start a Discussion
Nagaraju Mogili 31Nagaraju Mogili 31 

how can we display the contact fields on vf page using apex controller

Best Answer chosen by Nagaraju Mogili 31
v varaprasadv varaprasad
Hi Nagaraju,

Please check code once :
public class DisplayFields {
    public Contact con{get;set;}
    public DisplayFields(){


===========Vf page =======

<apex:page controller="DisplayFields">
        <apex:pageBlock title="Contact fields">
                    <apex:inputField value="{!con.Lastname}"/>
                    <apex:inputField value="{!con.Phone}"/>
                    <apex:inputField value="{!con.Email}"/>


Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.

@For Support: varaprasad4sfdc@gmail.com