The following steps shows how to perform CRUD (Create, Update and Delete) operations on schedule control with the SQL table data making use of SignalR concept.
Step 2: Add the necessary scripts of SignalR and other assembly reference as shown below.
Figure 1 - SignalR script reference
Figure 2 - SignalR assembly reference
Step 3: To make use of the SignalR concept, create a SignalR Hub class in your application as shown in the below image.
Figure 3 - SignalR Hub Class creation
Step 4: Add the below highlighted SignalR mapping code in the Startup class to avoid the SignalR/hubs not found script error.
Step 5: Define the method “Modify” within the scheduleHub class, where the method name (modify) to be used in the client side is declared as given below.
Step 6: In the Default.aspx page, add the following script code which gets executed every time, whenever the Scheduler appointments in the page is being added/ modified/ deleted/ dragged/ resized/ navigated simultaneously in one or many of the browser instances. Also, once it is executed, those changes will be reflected parallel on all the clients.
Step 7: Run the below attached sample with which you can perform insert, edit, and delete operations on the schedule appointments that simultaneously reflects on the SQL database and also on all the client systems.
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|
|5739||11/20/2015||11/20/2015||ASP.NET Web Forms||Schedule|