<apex:page controller="Registrations">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:inputText value="{!Searched}"/>
<apex:commandButton value="Submit" Action="{!Submit}"/>
<apex:pageBlockTable value="{!Regs}" var="a">
<apex:column Value="{!a.Name__c}"></apex:column>
<apex:column Value="{!a.Email__c}"></apex:column>
<apex:column Value="{!a.Pancard__c}"></apex:column>
<apex:column Value="{!a.Phone__c}"></apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
___________________________________________________
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:inputText value="{!Searched}"/>
<apex:commandButton value="Submit" Action="{!Submit}"/>
<apex:pageBlockTable value="{!Regs}" var="a">
<apex:column Value="{!a.Name__c}"></apex:column>
<apex:column Value="{!a.Email__c}"></apex:column>
<apex:column Value="{!a.Pancard__c}"></apex:column>
<apex:column Value="{!a.Phone__c}"></apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
___________________________________________________
public class Registrations{
public List<Registrations_c> Regs{set;get;}
Public String Searched{set;get;}
public Void Submit(){
Regs=[select id,Name__c,Email__c,Pancard__c,Phone__c from Registrations__c where name=:Searched];
}
}
________________________________________________
No comments:
Post a Comment