
13 Answers, 1 is accepted

The MVC programming model to his advantage, but there are also disadvantages, page data and logic processing mainly by JS control, C# is only to the front-end data transfer function, the C# instead of weakening, the enhanced JS and web; from ASPX, aspx.cs aspx.cs played this way with powerful back-end processing capabilities of C#, not only can provide data, but also can process the front interface with C# display or logical processing; hope to use the Razor Pages Cs, play the powerful function of C#
Razor is a template syntax that renders at server-side, Razor doesn't capture DOM for future processing, so something like ASP.NET WebForms server control is not a great choice to be supported by Razor, but you can leverage some of event-driven model in Razor Pages, for more details you can check out my blog post Razor Pages Commands & Events(http://hishambinateya.com/razor-pages-commands-and-events)
If you have an interest of event-drive model you can contribute to my project ASP.NET Core Web Forms(https://github.com/hishamco/WebForms)
We have started the migration process, and will provide support for the Core 2.0 version in the upcoming R3 2017 release, scheduled for mid September.
As for the Razor pages, we are also currently evaluating the usage of our product in such pages and will have further information with the above-mentioned release.
Regards,
Nencho
Progress Telerik

Nencho,
Did you guys have a chance to look at supporting RazorPages from Core 2.0 ?
Yes, the Razor Pages are supported with the Telerik UI for ASP.NET Core (2.0). Do you experience any issues or do you need any guidance in certain scenario using our components?
Regards,
Nencho
Progress Telerik

Hello Nencho,
Can you give us an example of templates with the grid component please?
I don't know in which folder the .cshtml file shoud be. I don't have a "Views" folder with razor pages.
I would like to use templates for popup data editing please.
Regards,
Fabien
In a Razor Pages context in ASP.NET Core 2.0 you should have the views in a Page folder. As for the grid functionality, I would suggest you to navigate to the following documentation articles, where the implementation of the templates for popup data editing are demonstrated. There is no difference, when you attempt to use them in Razor Pages.
For more information on the Razor Pages, please refer to the following article:
https://docs.microsoft.com/en-us/aspnet/core/mvc/razor-pages/?tabs=visual-studio
Regards,
Nencho
Progress Telerik

Thanks Necho.
I have no issues when trying to use the grid with the Razor pages, but I can't find how to implement properly the templates for popup date editing.
My templates seem to be ignored when I specify the "TemplateName" attribute.
I'm certainly missing something, but I don't see what, and I had no issues with the same kind of code in MVC.
Regards,
Fabien
By default the Grid will look for the editor templates in the ~/Views/Shared/EditorTemplates folder. If the template is not located there it will not be found and the editor will not be rendered.
Please examine the following article that describes using editor templates in more detail:
Regards,
Viktor Tachev
Progress Telerik

Thanks Viktor, I finally made it work with Razor pages.
At first, I thought that I had to put the Shared folder in the Pages folder, and it was a bad idea...
Regards,
Fabien


Razor Pages are a new feature in ASP.NET Core 2.0. They provide a simpler way to organize code within ASP.NET Core applications, keeping implementation logic and view models closer to the view implementation code. They also offer a simpler way to get started developing ASP.NET Core apps, but that doesn’t mean you should dismiss them if you’re an experienced .NET developer. You can also use Razor Pages to improve the organization of larger and more complex ASP.NET Core apps.
The Model-View-Controller (MVC) pattern is a mature UI pattern
that Microsoft has supported for developing ASP.NET applications
since 2009. It offers a number of benefits that can help application
developers achieve a separation of concerns, resulting in more
maintainable software. Unfortunately, the pattern as implemented in
the default project templates often results in a lot of files and
folders, which can add friction to development, especially as an
application grows. In my September 2016 article, I wrote about using
Feature Slices as one approach to address this issue. Razor Pages
offer a new and different way to tackle this same problem, especially
for scenarios that are conceptually page-based. This approach is
especially useful when all you have is a nearly static view, or a
simple form that just needs to perform a POST-Redirect-GET. These
scenarios are the sweet spot for Razor Pages, which avoid a great
deal of the convention required by MVC apps.

Razor Pages are a new feature in ASP.NET Core 2.0. They provide a simpler way to organize code within ASP.NET Core applications, keeping implementation logic and view models closer to the view implementation code. They also offer a simpler way to get started developing ASP.NET Core apps, but that doesn’t mean you should dismiss them if you’re an experienced .NET developer. You can also use Razor Pages to improve the organization of larger and more complex ASP.NET Core apps.
