• sri divya
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
this is my vf page

<apex:page showHeader="false" sidebar="false"  controller="bankform1">
  <apex:form >
  <apex:commandButton value="save and new" action="{!savenew}"/>
  <apex:commandButton value="cancel" action="{!cancel}"/>
  <apex:commandButton value="dipaly" action="{!display}"/>
  <apex:sectionHeader title="bank" subtitle="bank form"/>
  
  <apex:pageBlock title="personal info">
  <apex:pageBlockSection title="bankform1">
  <apex:pageBlockSectionItem >
  <apex:outputLabel >account holder Name</apex:outputLabel>
  <apex:inputText value="{!c_Name}"/>
  </apex:pageBlockSectionItem><br/>
  
     
  
  </apex:pageBlockSection>
  </apex:pageBlock>
  </apex:form>
</apex:page>




and this is my controller


public class bankform1 {

    public String c_Name { get; set; }

    public PageReference display() {
        return null;
    }


    public PageReference cancel() {
        return null;
    }


    public PageReference savenew() {
        return null;
    }

    public PageReference save()
    
    {
        bankform1__c obj = new bankform1__c();
        obj.name=c_Name;
        insert obj;
        return null;
}
}
this is my vf page

<apex:page showHeader="false" sidebar="false"  controller="bankform1">
  <apex:form >
  <apex:commandButton value="save and new" action="{!savenew}"/>
  <apex:commandButton value="cancel" action="{!cancel}"/>
  <apex:commandButton value="dipaly" action="{!display}"/>
  <apex:sectionHeader title="bank" subtitle="bank form"/>
  
  <apex:pageBlock title="personal info">
  <apex:pageBlockSection title="bankform1">
  <apex:pageBlockSectionItem >
  <apex:outputLabel >account holder Name</apex:outputLabel>
  <apex:inputText value="{!c_Name}"/>
  </apex:pageBlockSectionItem><br/>
  
     
  
  </apex:pageBlockSection>
  </apex:pageBlock>
  </apex:form>
</apex:page>




and this is my controller


public class bankform1 {

    public String c_Name { get; set; }

    public PageReference display() {
        return null;
    }


    public PageReference cancel() {
        return null;
    }


    public PageReference savenew() {
        return null;
    }

    public PageReference save()
    
    {
        bankform1__c obj = new bankform1__c();
        obj.name=c_Name;
        insert obj;
        return null;
}
}