Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make a Copy of a Page for same task with new data

Status
Not open for further replies.

B827

Technical User
Feb 14, 2002
281
GB
Hi,
I am moving on from ASP to ASP.NET and need some advice. I have an application where I have to perform a very similar task on two datasets. I have a page which does what I want on one of the tables and would now like to repeat the process on the other.
In good old ASP I would just copy the page and do some simple editing of names and it would work fine. In Visual Studio.NET if I try a "Save As" the code behind pages get horribly confused and neither the original nor the copy work. The only way to do what I want appears to be to start designing again from the beginning. This is a long way round for a short-cut; or am I missing something?

Many thanks

Sandy
 
You can just select a page in the solution explorer, click copy select the project again and click paste. However, the class name that is given to the page in the code behind file may remain the same so you may have to rename it. Alternatively, you can do the same thing in windows explorer but remember to change the class name again.

Another method, if the functions are bascially the same but for different tables, would be to look at only using one page based on a certain criteria (e.g. a querysting value, or a session variable etc).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top