Aaron, that doesn't even come close. You're creating a Page_Load method in
your cfc that YOU have to invoke.

<cfset blah = CreateObject(.........) />
<cfset blah.Page_Load() />

Also, what is your request.resultLabel? Text on the cfm page or just a
variable? Your cfm has a #request.resultLabel# being output somewhere,
right?

You wrote VB so I assume you know everything else that Label allows you to
manipulate (style, size, etc). The control isn't there for CF like
ASP.NETin code-behinds which is why CF doesn't can't fully mimic the
code-behind. I
would agree with Dave here...this is an ASP.NET thing and CF can't follow;
and I'll add, with just code and not actual CF updates.

On 11/29/06, Aaron Roberson <[EMAIL PROTECTED]> wrote:
>
> > That's one that uses a MasterPage as well (from a site I'm building
> right
> > now). Mind you, VS takes care of this.  Yet in still, you can't control
> the
> > page in the component or tag in CF like you can in ASP.NET.
>
> Why not?
>
> All you have to do is invoke an object and init the constructor (even
> if you do not pass anything to the constructor) at the top of the
> ColdFusion template page.
>
> Page directive in ASP.NET:
> <%@ Page Language="VB" AutoEventWireup="false"
> CodeFile="Default.aspx.vb" Inherits="_Default" %>
>
> Page directive in CF:
> <cfinvoke component="path.default" method="Page_Load">
>
> For Code-Behind in ASP.NET:
>
> Partial Class _Default
> Protected Sub Page_Load(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles Me.Load
>        resultLabel.Text = Application("userCount")
> End Sub
> End Class
>
> For Code-Behind in CF:
> <cfcomponent>
> <cffunction name="Page_Load" access="public">
> <cfset request.resultLabel = applicaion.usercount>
> </cffunction
> </cfcomponent>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262173
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to