function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vadivel MuruganVadivel Murugan 

Picklist value

How to get selected pick list values in apex
Mrunali GaonkarMrunali Gaonkar
HI,
You can use a get;set; to get selected picklist values in your apex.
Darshan Shah2Darshan Shah2
Hello Vadivel Murugan,

You can use below code:
Page:
<apex:selectList value="{!selectedCountry}" multiselect="false" size="1">
    <apex:selectOption itemValue="INDIA" itemLabel="India"/>
        <apex:selectOption itemValue="USA" itemLabel="USA"/>
        <apex:selectOption itemValue="United Kingdom" itemLabel="UK"/>
</apex:selectList>

Class:
public String selectedCountry {get;set;}

Warm Regards,
Darshan Shah
Sagar PareekSagar Pareek
https://www.salesforce.com/docs/developer/pages/Content/pages_compref_selectList.htm