Second custom controller.apex

Image:cookbook.jpg

Force.com Cookbook Sample Code
Chapter 13: Getting Started with Visualforce - Creating Your First Visualforce Controller

To download all the code samples, access the Cookbook. - Image:Key_icon.gif

public class mySecondController {
	public Account getAccount() {
		return [select id, name from Account where id = :System.currentPageReference().getParameters().get('id')];
	}

	public String getName() {
		return 'My Second Custom Controller';
	}
}

Sample code provided by salesforce.com. All rights reserved.