How to get values from apex:inputField in controller?

Visualforce page:

     <apex:page standardController="Blog__c" extensions="sample">
        <apex:inputField value = "{!Blog__c.Name}"/>
        <apex:inputField value = "{!Blog__c.URL__c}"/>    
    </apex:page>

Apex Controller:

    Public Blog__c blg;
    public sample(ApexPages.StandardController controller)
    {

        this.blg = (Blog__c)controller.getRecord();
    }

No comments:

Post a Comment