New to Telerik UI for ASP.NET Core? Download free 30-day trial

ASP.NET Core Chat Data Binding

Loading Demo...
  • EXAMPLE
  • VIEW SOURCE
  • Edit in Telerik REPL
HtmlHelper
TagHelper
Files:
data_binding.cshtml
Data_BindingController.cs
Data_Binding_TagHelper.cshtml

Also available for:

CLIENT-SIDE API HTML HELPER API

Description

The Telerik UI for ASP.NET Core Chat supports local and remote data binding that allows you to load messages from a local collection or specify a remote endpoint that returns the underlying data.

To configure the Chat for remote data-binding, you need to specify a remote endpoint or web service returning data in a JSON or JSONP format, and utilize the Telerik UI for ASP.NET Core DataSource as a mediator between the component and the underlying data.

To make the connection to the remote endpoint and process the data properly, the DataSource requires information about the web service URL. Also, you must specify the following options within the Chat configuration that map the Model properties in the data collection:

  • TextField()
  • AuthorNameField()
  • AuthorIdField()
  • AuthorImageAltTextField()
  • AuthorImageUrlField()
  • TimeStampField()
  • IdField()
  • IsDeletedField()
  • FilesField()
  • IsTypingField()

This example demonstrates how to bind the Chat to remote data by configuring its DataSource().

Additional Apps

This Chat example is part of unique collection of hundreds of ASP.NET Core demos, with which you can see all Telerik ASP.NET Core components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in Telerik REPL for ASP.NET Core or ThemeBuilder.

Support & Learning Resources

Additional Resources