
We see a lot of samples in the demo pages.
However, we would like to see them in action and download the fully functional demo on localhost.
On Git I didn't found the samples. Is there, and, if is, where, the sources for ASP.NET compoentnts.
I wonder especially for a sample example of DataGrid, like this one https://demos.telerik.com/aspnet-core/grid/editing-custom
.NET 5 (CORE) for RazorPages, by example
1 Answer, 1 is accepted
Hi Serge,
The whole project from which the ASP.NET Core demos site is seeded is shipped in the installation folder. You could find the Visual Studio project at:
~installationFolder\wrappers\aspnetcore\Examples\AspNet.Core\VS2019\Kendo.Mvc.Examples
Moreover, we have a dedicated repository for corner cases that are for Razor Pages and MVC.
https://github.com/telerik/ui-for-aspnet-core-examples
Please note that the only difference between the MVC and RazorPages is the URL routing and generation. Other options are held equal.
If there is anything else I can help with, let me know.
Regards,
Tsvetomir
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
More than that, the code in the example on web is not found in that project. By ex, I 've searched "@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.ProductViewModel>()" and such a code is not available nor in MVC, nor in RazorPages projects, however present in examples
Indeed, you are correct. The example from the web is not available in the repository because that example is shipped from another repository into your installation folder. If you have installed the Telerik UI for ASP.NET Core in your project via NuGet, you should download the examples from your telerik.com account:
https://www.telerik.com/account/product-download?product=UIASPCORE
After the download, you should search for the Kendo.Mvc.Examples solution where the demo will be available.
I expected to have a zip with examples, you gave me an MSI setup... normally I don't want to update or reinstall the components, I need only the samples...
please allow to delete comments. I installed the zip. The sample is ultracomplex for a begginner. it's better to have independent multiple samples that a big application with complex partial controllers and crazy session data binding...
a sample should be sample.
Serge, for general requirements on using Telerik UI for ASP.NET Core components in RazorPages application you can refer to the documentation section below:
Using Telerik UI for ASP.NET Core in a Razor Pages Project
Generally speaking, as a major difference to MVC application, for data bound components you need to make sure to send the AntiForgeryToken with each POST request of the page.
I see Tsvetomir has shared the Repository we have with examples of the Component's use in RazorPages application:
https://github.com/telerik/ui-for-aspnet-core-examples
It contains general examples on how to bind components to data and in some cases more complex example. You can review it for samples and details how to use the components. If you have any specific issues I can suggest creating a forum post on them so they can be discussed or submitting a support ticket.
If you feel there is some major lack in the documentation or you miss any details on making the Telerik UI for ASP.NET Core components work in RazorPages feel free to share your thoughts. We will consider them for improving the documentation.
Serge, the two projects you refer to are indeed different and that is why they are distributed in a different manner.
- The ASP.NET Core demos site is part of the official distribution and is available in the installation folder. It includes a lot of other logic other than the demos themselves. Its goal is to highlight the main features and configuration options for Telerik UI for ASP.NET Core components.
- The RazorPages example project highlights particular scenarios when the components are used in RazorPages, eg. particularities for data bound components, handling the submission of antiforgery tokens, etc. It is a supplementary application aimed at demonstrating approaches on different frequently asked questions, features and scenarios for Telerik UI for ASP.NET Core components.
I will bring to the team's attention the suggestion to additionally share the demo application on GitHub. In the meantime you and anyone else can review the demo site application locally in the installation folder, via the path specified in the thread above.
Hi, Serge, indeed, the full source code for the demos is not readily available on GitHub, or at least, they are not available in a public repository. What we do is that we develop in a VS project that contains several auxiliary projects such as the tests, source, demos, export functionality etc. After that, with each release we distribute the project with the respective release files.
As Aleksandar mentioned, we will raise your feedback for discussion in the team.
Hello. It's been a couple years and still all of the ASP Core UI examples are all MVC/Controllers with a few select Razor examples provided. For those of us NOT using MVC, did the (GIT) project ever get updated with Razor samples for all of the Examples out on https://demos.telerik.com/aspnet-core --> https://demos.telerik.com/aspnet-core/grid or are people still running the MVC project to glean the straight Razor solutions? Thanks
Hi Trent,
We've indeed missed updating this thread with the latest development relating to the topic. We have decided against distributing all the ASP.NET Core Demos in a separate Razor Pages project. Here are the reasons behind this decision:
- Generally, Telerik UI is a front-end product and the configuration of the back-end is left for the individual developer to customize.
- Creating a separate Demos project for Razor Pages will essentially double the amount of examples that we will need to maintain without introducing any more Component functionalities. Although this will decrease the learning curve of the product it will be detrimental to the quality of the product for more experienced users since we will have to be focused on the maintenance of both Demo projects.
With that being said, I have submitted a Feature Request in our feedback portal for the adaptation of the .NET Core MVC Scaffolders for Razor Pages as well. This way we will be able to evaluate the community interest in such a feature. This is one of the ways we determine what to include in our future planning.
Please be aware that because the feature request has been created internally, it has been submitted on behalf of Serge who is Original Publisher of the current forum thread.
Finally, here are the available options to get help if you currently experience difficulties with the configuration of our Components in a Razor Pages project:
- Take a look at our Getting Started with Razor Pages article. There you will find links for the available documentation articles of the Components. There sample snippets and guidelines are available;
- For more complex scenarios refer to the extensive examples in our public RazorPages GitHub repo;
- Since you have an active support license you can submit a support ticket. There one of our support officers will be able to assist you within the range of the product's support scope.
I hope the information above is insightful.