Click here to Skip to main content
15,896,378 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear All


How do you copy the menu setup from one project to a new project.

My project is corrupted hence I need to copy the menu from the corrupted menu to a new.


asp.net c#

What I have tried:

checked the internet and tried some approach
Posted
Updated 19-Jun-16 0:28am
v2
Comments
Sergey Alexandrovich Kryukov 19-Jun-16 10:08am    
Why do you think that a copy of "corrupted menu" will be not corrupted? 1) always use Revision Control system, 2) dig into the problem, find out what caused it, 3) know how to recreate the project from available files.
—SA

1 solution

Easy way?
Simple: edit the myfilename.designer.cs file and copy and paste all the menu related code into the equivalent places in your new project designer file. Then just add the handlers from your myfilename.cs file and you should be good to go.
If the project is corrupt so you can't open it in VS, then try doing this in Notepad, but you need to find out how and why your project was corrupted - or it's just going to happen again to you new project. Backups are a very good idea at this point...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900