If am correct, you want to insert new account record into the database using the visualforce page. Then in your controller's constructor create an instance of the account object. See the below code (AccountExample1() constructor.).
public class AccountExample1
{
public void Save() {
//acc = new Account();
insert acc;
}
public AccountExample1()
{
acc= new Account();
//acclist = [Select * from Account];
}
public Account acc{set;get;}
//public List<Account> acclist{set;get;}
public void ActionToDo()
{
}
}
Hi,
If am correct, you want to insert new account record into the database using the visualforce page. Then in your controller's constructor create an instance of the account object. See the below code (AccountExample1() constructor.).
Regards,