asp.net mvc - How to escape to use page's names like string "Index" -


I'm thinking that there is a good way to avoid using

  return To use something like redirectToAction ("index")  

and

  return redirect tiections (appage.exx.tostening))  

> The idea of ​​getting rid of possible errors is possible.

Redirect redirect ("indexx")

For this, count of the counting or static class Is yoga?

Thank you!

PS

I just found this great article

There is a project that you can use.

It provides strong typing for your thoughts and actions.

There is also a package in it

The advantage of using it is that you do not have to manage the process.

Instead of using the string literally "index" you can use it as the following. This

  return RedirectToAction (MVC.Home.Index); // Suppose we are in Home Controller  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -