473,386 Members | 1,785 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,386 software developers and data experts.

Create my own template for starting code behind files?

Hi,

Does VS.NET Beta 2 provide allow you to define your own template to be used
for new code behind pages?

For example I have common code that needs to go into get code behinds
Page_Load event. So when I use VS.NET to create a new web form, it would be
great if it would enter this custom code into the Page_Load in the code
behind file. Currently I have to remember to paste this in from another
source, and sometimes I miss this step.

Likewise it would be nice if this could be done for the regular web form
too. For instance I'd like to add a MasterType line to every web form
..aspx. Currently I have to remember to do this manually.

Thanks,

Steve
Nov 19 '05 #1
1 1194
Maybe you should create a template.
From within Visual Studio 2005, select "Export Template..." from the File
dropdown menu.
Then follow the wizard steps...

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Steve Franks" <pl****@postreplyhere.com> wrote in message
news:As********************@comcast.com...
Hi,

Does VS.NET Beta 2 provide allow you to define your own template to be
used for new code behind pages?

For example I have common code that needs to go into get code behinds
Page_Load event. So when I use VS.NET to create a new web form, it would
be great if it would enter this custom code into the Page_Load in the code
behind file. Currently I have to remember to paste this in from another
source, and sometimes I miss this step.

Likewise it would be nice if this could be done for the regular web form
too. For instance I'd like to add a MasterType line to every web form
.aspx. Currently I have to remember to do this manually.

Thanks,

Steve

Nov 19 '05 #2

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

Similar topics

4
by: Joe | last post by:
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...
8
by: Colin Mc Mahon | last post by:
Hi all, I am currently using a system you are probably familiar with if you have done any templating with vbscript, define a template file with special tokens in it(like ##Content## etc), load...
2
by: Sanjay Pais | last post by:
We are using ASP.2.0 and I was wondering if any one knew how I could modify the default.aspx. What I want to do is add some new HTML to the aspx page as well as either change the code behind or...
8
by: Paw | last post by:
Greetings. I use asp. what I need is is when a visitor comes to the site, I need it to check the host name. if "www.hometowndigest.com" is the host, then check a folder named "something" and if...
8
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the...
2
by: JT | last post by:
Okay, I've seen about 4 years' worth of posts about this with no viable solutions. I've spent 9 hours today trying to fix this. It works BEAUTIFULLY on my local IIS installation, but when I...
1
by: Bazza Formez | last post by:
Hi, I am wanting to build a new site & have decided to start with a template from www.asp.net ... the TimeTracker template is an ideal starting point for me. I started a new web site from VS...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
2
by: =?Utf-8?B?V29ua28gdGhlIFNhbmU=?= | last post by:
Hello, I have an existing (WPF) Class Library project that I'd like to add a WPF Custom Control to. However, when I try to Add New Item, that isn't one of the available options. Perhaps this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.