Editing aspx templates in WCSF

Topics: Web Client Software Factory
Sep 13, 2007 at 3:03 PM
Hi there, I'm brand new to WCSF and have a question about editing templates:

I have a project where my Master Page will have two ContentPlaceHolder controls on it. To populate these I have two Content controls in each aspx page - how could I edit the templates so that every aspx page added to the project will have these two Content controls automatically?

Thanks in advance,
Sep 13, 2007 at 6:21 PM
Hi Greg.

You can register your custom Guidance Package with your custom MasterPage.
For this...

1) Install WCSF June 2007 Source Code (%Microsoft Web Client Factory Install Folder%\Source Code\WebClientFactorySourceInstall.msi).
2) Open WebClientFactory Guidance Package solution (%WCSF Source%\GP\WebClientFactory).
3) Go to WebClientFactoryPackage\Templates\Solutions\Projects\WebProjects\Shared and edit the Default.master file.
4) Register Guidance Package.

For more information about how to register the Guidance Package, please, read the following WCSF documentation topic:
  • Overview (Inspecting the Software Factory Assets -> Guidance Automation -> Overview)
  • Registering the Web Client Software Development Package(Inspecting the Software Factory Assets -> Guidance Automation -> Registering the Web Client Software Development Package).

Hope it helps!

Sebastian Iacomuzzi
Sep 14, 2007 at 1:49 PM
Hi Sebastian - that's great cheers, gives me plenty to look into.

Each time I add a Business Module to a project it adds a folder of the same name and it's own Default.aspx page to the WebSites part of the solution - I'm still confused about how I'd get that Default.aspx (or a View that might be added) to contain a pre-defined layout such as having 2 Content controls (not ContentPlaceHolders). Can you point me in the right direction?

Sep 14, 2007 at 8:23 PM
Hi Greg,
I believe you need to edit the Default.aspx.t4 template in folder:

%WCSF Source%\GP\WebClientFactory\WebClientFactoryPackage\Templates\T4\Module.CS\

Jarod Ferguson
Sep 17, 2007 at 2:49 PM
Thanks very much Jarod - that's exactly what I needed.