viewengine - ASP.NET MVC: How do I get all available views? -
I have a controller on my site that handles anonymous operations and if it is present then returns a view such that That's because static content can be added to this particular area of the site without modifying the controller. The problem I am experiencing now is to create a sitemap.xml file that includes links to all "unknown" views I
Credit from the code given below Shows that I am doing for the unknown functions:
protected override void Handlagyatakshn (string Akshnanme) {GetUnknownActionResult (actionName) Kanukrmit Result (controller Consort) is; } [Nonaction] // is public, so this testable public action is GetUnknownActionResult (string actionName) {var result = view (actionName); If (result.ViewEngineCollection.Any (Engine => engine.FindView (Controller Context, result. ViewName, null, true) see! = Null)) {return result; } Return new HTTP Notepoint Result (); }
If you serve static content such as .htm files and .pdf files There are a "static content" directory, I use only System.File.IO
to enumerate those files, and I create my links with it.
Comments
Post a Comment