+ Start a Discussion
srikanth challasrikanth challa 

How to use <apex:commandbutton> in html

How to convert the below line into HTML for Salesforce1 VF page
<apex:commandbutton style="float:centre" value="Save" action="{!saveRecord}" />
Pramodh KumarPramodh Kumar
<input type="submit" name="thePage:theForm:theButton"value="Save" />
srikanth challasrikanth challa
What about the action tag which calls the controller ?
Pramodh KumarPramodh Kumar
<input type="submit" value="Save" action="{!Save}"/>

public String getSave() {
        system.debug('this is test method');
        return null;

Rahul SharmaRahul Sharma
Use input button as mentioned by pramod and call apex:actionFunction (https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_actionFunction.htm) on click of button.