Boilerplate template doing its own thing?

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

Everything works aok, except the code behind "Dataview.cs" does not contain
the prewritten code that is in the template.
It comes out very slimed down without almost all lines in template. Why
does it wrtie it's own version of the code behind?

This is my configuration...

C:\Program Files\Microsoft Visual Studio
..NET\VC#\VC#Wizards\RRPortalCSharpAddWebUserControl>dir /s
Volume in drive C is Local Disk
Volume Serial Number is DCDE-5D94

Directory of C:\Program Files\Microsoft Visual Studio
..NET\VC#\VC#Wizards\RRPortalCSharpAddWebUserControl

02/16/2004 02:35p <DIR> .
02/16/2004 02:35p <DIR> ..
02/16/2004 02:35p <DIR> Scripts
02/16/2004 02:35p <DIR> Templates
0 File(s) 0 bytes

Directory of C:\Program Files\Microsoft Visual Studio
..NET\VC#\VC#Wizards\RRPortalCSharpAddWebUserControl\Scripts

02/16/2004 02:35p <DIR> .
02/16/2004 02:35p <DIR> ..
02/16/2004 02:35p <DIR> 1033
0 File(s) 0 bytes

Directory of C:\Program Files\Microsoft Visual Studio
..NET\VC#\VC#Wizards\RRPortalCSharpAddWebUserControl\Scripts\1033

02/16/2004 02:35p <DIR> .
02/16/2004 02:35p <DIR> ..
07/31/2001 05:37p 1,431 default.js
1 File(s) 1,431 bytes

Directory of C:\Program Files\Microsoft Visual Studio
..NET\VC#\VC#Wizards\RRPortalCSharpAddWebUserControl\Templates

02/16/2004 02:35p <DIR> .
02/16/2004 02:35p <DIR> ..
02/26/2004 09:33a <DIR> 1033
0 File(s) 0 bytes

Directory of C:\Program Files\Microsoft Visual Studio
..NET\VC#\VC#Wizards\RRPortalCSharpAddWebUserControl\Templates\1033

02/26/2004 09:33a <DIR> .
02/26/2004 09:33a <DIR> ..
02/16/2004 03:01p 1,100 DataView.ascx
02/16/2004 03:14p 6,384 DataView.cs
02/26/2004 09:32a 28 templates.inf
3 File(s) 7,512 bytes

Total Files Listed:
4 File(s) 8,943 bytes
14 Dir(s) 33,296,834,560 bytes free


The template.inf looks like this....
DataView.ascx
DataView.cs

The RRPortalCSharpAddWebUserControl.vsz (in the CSharpProjectItems
directory) looks like this:
VSWIZARD 7.0
Wizard=VsWizard.VsWizardEngine
Param="WIZARD_NAME = RRPortalCSharpAddWebUserControl"
Param="WIZARD_UI = FALSE"
Param="PROJECT_TYPE = CSPROJ"

The RRPortal.vsdir ( in a new folder called RRPortal which is a subdir of
VC#\CSharpProjectItems\WebProjectItems\ ) looks like:
...\..\RRPortalCSharpAddWebUserControl.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79E
FBC}|RRPortalView|55|Add a new reporting View to
Project|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4558|0|DataView.ascx
 
Hi Joe,

Thanks for your post. I am checking this issue, and I will update you with
my information.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hello Joe,

As I understand, the problem you are facing is that the code behind of your
template is not added. Please correct me if there is any misunderstanding.
I'd like to share the following information with you:

Based on my expreience and research, the template for the code behind file
resides on the <Program Files>\Microsoft Visual Studio .NET
2003\VC#\DesignerTemplates\1033\ instead of specifying in the template.inf
file. The following article discusses this issue in details, please check
it on your side.

How to build your own ASP.NET templates for VS.NET
http://www.codeproject.com/aspnet/BuildAspNetTemplates.asp

I am standing by for your result!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Yes I agree the code behind for .ascx's resides in
....\DesignerTemplates\1033\ .

What if I have two .ascx templates. How do I put two templates there and
distinguish between the two?

Joe
 
Or better...

How do I PRESERVE the default .ascx, and add my own custom ascx's?

Yes I agree the code behind for .ascx's resides in
....\DesignerTemplates\1033\ .

Regards,

Joe
 
Hi Joe,

Thanks for your response. I am not sure what you mean by two .ascx files.
If they are not related, you should create two templates for each .ascx
file respectively.

I am standing by for your feedback.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hi Joe,

Please refer to the following article which describes the detailed
information on how to add code behind file, I tested it on my side and it
works properly.

How to build your own ASP.NET templates for VS.NET
http://www.codeproject.com/aspnet/BuildAspNetTemplates.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top