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
Hiteshkumar Chaudhari 2Hiteshkumar Chaudhari 2 

how to use lookup field in visualforce page and how to write apex code for controlling

I want to use lookup field in my visualforce page . Can anybuddy help me to achieve that with the controller code
Navin SoniNavin Soni
// Controller
public class MyCustomLookupController {
public Contact contact {get;set;}
    public MyCustomLookupController() {
        contact = new Contact();
    }
}

//Visualforce Page 
<apex:inputField id="Account" value="{!contact.AccountId}"/>