Newbie: How to duplicate a webform (including code) - I'm confused.

D

Dave Smithz

Hi there,

I am sure there is a very simple answer to this question. But how does one
duplicate a webform in ASP.net? E.g. I have a webform that has standard
basic functionality for my whole web application (e.g. a navigation bar and
general layout). I want to copy this form many times as it is the template
for each page within my application.
However, when I use "save as" and save the webform as a different name,
things do not go as planned. Also I want all the underlying code to be
copied as well (e.g. so if I use a link button, on my first page, I want the
underlying code for that button to also copy through to the duplicate page).

So how is this achieved?

I'm probably going to be told there is a better way of having a template
page as well. This information will be useful as well, but for the time
being, duplicating manually a template page will do fine.

Kind regards

Dave.
 
S

Scott Mitchell [MVP]

Dave, in ASP.NET 1.x, there's not a real easy way to do this. There are
Master Pages - http://aspnet.4guysfromrolla.com/articles/040704-1.aspx -
but these have poor tool support in VS.NET 2002/2003.

Fortunately this becomes much less of a pain with ASP.NET 2.0 and Visual
Studio 2005... but for the time being, it's not as easy as it *should*
be. But do check out Master Pages in ASP.NET 1.x, it's better than just
copying and pasting code around on each page...


Dave said:
I am sure there is a very simple answer to this question. But how does one
duplicate a webform in ASP.net? E.g. I have a webform that has standard
basic functionality for my whole web application (e.g. a navigation bar and
general layout). I want to copy this form many times as it is the template
for each page within my application.
However, when I use "save as" and save the webform as a different name,
things do not go as planned. Also I want all the underlying code to be
copied as well (e.g. so if I use a link button, on my first page, I want the
underlying code for that button to also copy through to the duplicate page).

So how is this achieved?

I'm probably going to be told there is a better way of having a template
page as well. This information will be useful as well, but for the time
being, duplicating manually a template page will do fine.


--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com

* When you think ASP.NET, think 4GuysFromRolla.com!
 
D

Dave Smithz

Dave, in ASP.NET 1.x, there's not a real easy way to do
this. There are
Master Pages - http://aspnet.4guysfromrolla.com/articles/040704-1.aspx -
but these have poor tool support in VS.NET 2002/2003.

OK So not such a stupid question then. But now I probably have one. I've
knocked together a basic ASP.net website to show someone. But I wnat to show
them without having to run Visual Studio.net. Currently I press f5 to run
the web application, but I want to be able to just go to a URL without
having to run VS first.

How do I do this?

Kind regards

Dave
 
J

John Saunders

Dave Smithz said:
Dave, in ASP.NET 1.x, there's not a real easy way to do
this. There are

OK So not such a stupid question then. But now I probably have one. I've
knocked together a basic ASP.net website to show someone. But I wnat to
show
them without having to run Visual Studio.net. Currently I press f5 to run
the web application, but I want to be able to just go to a URL without
having to run VS first.

How do I do this?

What happens if you just go to the URL?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top