New Batch#100 (10th Nov 2021) - Salesforce Admin + Dev Training (WhatsApp: +91 - 8087988044) :https://t.co/p4F3oeQagK

Monday, 16 July 2012

Radio-buttons simple code



<apex:page controller="search">
<apex:form >
<apex:selectRadio value="{!searchCategory}" >
    <apex:selectOption itemValue="Member one" itemlabel="Member"/>
    <apex:selectOption itemValue="Blog" itemlabel="Blog"/>
    <apex:selectOption itemValue="Photo" itemlabel="Photo"/>
</apex:selectRadio>
</apex:form>
</apex:page>
*****************************
public class search {

    public String searchCategory { get; set; }

    // Constructor of the class
    public search()
    {
    searchCategory = 'Member one';
    } 
   
}


No comments:

Post a Comment

Labels