You need to sign in to do that
Don't have an account?
prabhavathi sharma
write an apex class to return the values to visualforce page
HI EVERYONE
MY QUESTION IS write an apex class to return the values to visualforce page
I Wrote this example where I did mistake please tell me
APEX CODE
public class example1 {
public Integar age;
public Example1()
{
age=10;
}
public Integar getAge()
{
return age;
}
public string getName()
{
return 'krishna';
}
}
VISUALFORCE PAGE
<apex:page controller="Example1">
<apex:outputlabel>{!age}</apex:outputlabel>
<apex:outputlabel>{!name}</apex:outputlabel>
</apex:page>
MY QUESTION IS write an apex class to return the values to visualforce page
I Wrote this example where I did mistake please tell me
APEX CODE
public class example1 {
public Integar age;
public Example1()
{
age=10;
}
public Integar getAge()
{
return age;
}
public string getName()
{
return 'krishna';
}
}
VISUALFORCE PAGE
<apex:page controller="Example1">
<apex:outputlabel>{!age}</apex:outputlabel>
<apex:outputlabel>{!name}</apex:outputlabel>
</apex:page>
use {get;set;} property for access class variable to vf page and set value by class constructor thanks
let me inform if it helps you and mark it best answer if my answer helps you