Changing a Controller name without losing information

Asked

Viewed 120 times

1

I have a Controller called Home and I want to change the same to BPA.

I want to know if I can just change the name HomeController for BpaController and change the name of the Home folder in the View folder.

Or if I need to change something else to work without giving problems.

  • 1

    It depends on your setup, but for the basics, it’s likely.

1 answer

2


To change the name of a class and its references, I suggest that change the file name for Visual Studio in Solution Explorer, so he will ask if you wish too change all references of that class, doing the whole process automatically for you.

All references shall be amended HomeController, however, you should change the references to the word Home manually.

  • He changed everything he wrote HomeController, where there was only Home, I had to change in the hand. But thanks for the tip.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.