473,378 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Templates c# code not added

Joe
I made a template for webforms. The template.inf calls for two files the
..ascx and the .cs. The .cs template file's code does not get written out to
the newly added control?

Joe
Jul 21 '05 #1
1 1308
Hello Joe,

Thanks for your post. As I understand, you create a template for webforms.
It adds the .ascx file without the codehide .cs file. Please correct me if
there is any misunderstanding. I'd like to share the following information
with you:

It seems to me that the template is similar to CSharpAddWebControl wizard.
The easiest way to proceed is to inspect the existing CSharpAddWebControl
wizard which consists of the following files:

1. Under "Program Files\Microsoft Visual Studio .NET
2003\VC#\VC#Wizards\CSharpAddWebUserControl", there are a template file
(WebUserControl.ascx), a list of templates (template.inf) and a script file
that drives the customization (default.js).

2. The code behind template NewWebUserControlCode.cs is put at "Program
Files\Microsoft Visual Studio .NET 2003\VC#\DesignerTemplates\1033"

3. A CSharpAddWebUserControl.vsz file which describes the wizard is placed
at "Program Files\Microsoft Visual Studio .NET
2003\VC#\CSharpProjectItems". Check
http://msdn.microsoft.com/library/de...us/vsintro7/ht
ml/vxconvszfiles.asp for a description of the format.

4. There are entries for CSharpAddWebUserControl.vsz in .vsdir files that
contains human readable information about your wizard. The files are
located at the "Program Files\Microsoft Visual Studio .NET
2003\VC#\CSharpProjectItems\WebProjectItems" folder. Check
http://msdn.microsoft.com/library/de...us/vsintro7/ht
ml/vxconvsdirfiles.asp for a description of the .vsdir format.

You can make a copy of this wizard, rename it, add a corresponding vsz and
vsdir files and then customize the template and script files to suit your
needs. In addition, I believe the following article is also helpful:

Tutorial: Creating Custom Project Template Wizards Using C# and .NET
http://www.c-sharpcorner.com/Code/20...stomWizard.asp

Please feel free to let me know if you have any problems or concerns.

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.

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: kelvSYC | last post by:
I'm trying to program something along the lines of a "trading card" idea: I have a single copy of the "card" in the program, yet there may be multiple "instances" of the "card", with differing...
1
by: Bo Xu | last post by:
Object of Combination By Bo Xu Introduction A combination of n things, taken s at a time, often referred as an s-combination out of n, is a way to select a subset of size s from a given set of...
16
by: WittyGuy | last post by:
Hi, What is the major difference between function overloading and function templates? Thanks! http://www.gotw.ca/resources/clcm.htm for info about ]
25
by: Ted | last post by:
I'm putting the posts that follow here (hopefully they will follow here!) because they were rejected in comp.lang.c++.moderated. It behooves anyone reading them to first read the the thread of the...
5
by: Mark | last post by:
Sorry for creating such a newbish topic, but I just can't seem to figure out what the problem is here. // main.cpp #include <cstdlib> #include <iostream> #include "Vector.h" using namespace...
2
by: Pat | last post by:
Hello everyone, I have a question that even my instructor is perplexed. I have created a template class within a header file. Then in a cpp file I have the methods that go with the class. I have...
9
by: patrik.nyman | last post by:
I have this templates to mark up hyphenation over line breaks: <xsl:template match="reg"> <xsl:apply-templates select="@orig"/> </xsl:template> <xsl:template match="reg/@orig">...
4
by: aaragon | last post by:
Hi everyone, I was unable to find out why my code is not compiling. I have a template class and I'm trying to write the operator<< for standard output. Does anyone know why this is not right?...
104
by: JohnQ | last post by:
Well apparently not since one can step thru template code with a debugger. But if I was willing to make the concession on debugging, templates would be strictly a precompiler thing? I have a...
4
by: Alan Silver | last post by:
Hello, Is it possible to modify the templates that come with VS2005? I have searched all over the place, but can't find them anywhere. I know I can make my own, but I would like to know if I can...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.