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
vamshi(Nani)vamshi(Nani) 

simple output

May be you people will smile at me..but i am not able to do this programme

 

<apex:page controller="testdisplay">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection title="test" >
<apex:outputText value="{!display}" />
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

 

 

 

public class testdisplay
{

public String display { get; set; }

public static string display()
{
return ('Hi viewers');
}
}

 

 

 

 

I am not getting the output as Hi viewers watz wrong with this programme

alibzafaralibzafar

Use, 

 

public String display;
public string getdisplay()
{
return 'HI Viewers';
}

 

vamshi(Nani)vamshi(Nani)
thankyou for you answer..but still not getting please check my vf code
once


thankyou
alibzafaralibzafar

Your VF code is fine, here is your complete code:

 

VF:

 

<apex:page controller="testdisplay">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection title="test" >
<apex:outputText value="{!display}" />
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

Controller:

 

public class testdisplay {

public String display;
public string getdisplay()
{
return 'Hi Viewers';
}
}

 

 

If this post helps you, Mark it as solution and please throw a Kudos by clicking Star ***