Coldfusion:form.fieldname 和 session.fieldname

Coldfusion: form.fieldname and session.fieldname

我是 ColdFusion 的新手,正在尝试将 CF 网络应用程序转换为 ASP.NET 网络应用程序。我们有 Index.cfm 文件和模板 Manage.cfm 文件。如果用户单击 Index.cfm 中的 link,它会打开 URL,其中包含类似 http://localhost/index.cfm?t=Manage.cfm 的内容。模板 Manage.cfm 正在使用消息 <p>Year of Completion is : <cfoutput>#session.YearOfCompletion#</cfoutput>

但是在 Index.cfmManage.cfm 中我都没有看到 session.YearOfCompletionform.YearOfCompletion 值已设置。 问题:模板如何在输出中获得#session.YearOfCompletion#值?看来我错过了什么。

开发人员初始化 ColdFusion 应用程序很常见,开始查找的常见位置是应用程序文件夹中的 application.cfc(.cfm) 文件。开发人员可能会做不同的事情,但是对于会话变量尤其如此,有一个名为 onSessionStart 的默认函数,它会为每个新用户会话触发一次。

很可能是因为正在为会话变量设置函数默认值。其他位置可能来自在 onRequest onRequestStartonSessionStart 函数中创建和启动的组件。