user204588
user204588

Reputation: 1633

ColdFusion to Asp.Net

I'm trying to translate these Coldfusion pages to asp.net. It seems like with ColdFusion, if there are variables defined in a page, say pageA and then pageB includes this page:

<CFINCLUDE template="pageA.cfm">

Then I will have access to all the variable defined in pageA. Same thing if I include another page, pageC in pageB.

<CFINCLUDE template="pageC.cfm">

Then, in pageC, I will be able to reference all the variables in pageB. How can I do this in ASP.NET? Do I have to use UserControls? Do I have to use Session Variables to get the same result?

Upvotes: 1

Views: 329

Answers (1)

Pablo
Pablo

Reputation: 1069

The cfinclude tag will include the file referred to in the template parameter in the current template and process it like any other code in the page. A User Control in ASP.NET can be created to exhibit the same behavior, so that would be the way to go. Session variables shouldn't be necessary unless the templates brought in through cfinclude use sessions.

Here's more info on including a User Control if you need it.

Upvotes: 1

Related Questions