List of Posts written during Mar 2021

This is a list of of posts written during the month Mar 2021
(Rev. 31-Oct-2024)

Categories | About |     |  

List of Posts

This is the complete list of categories of posts written during Mar 2021. They have been ordered by the publish date, with the most recent first.

  1. Published: 03-Mar-2021
    How to POST an ASP.NET Core Razor FORM through an Ajax Request. We discuss a practical approach that is to-the-point and easy to understand. The given code is ready to copy-paste!


  2. Published: 05-Mar-2021
    The following project has a textbox with a send button. The click event fires an AJAX GET request and sends a string parameter to an ASP.NET Core application, which responds by converting the parameter to its uppercase equivalent. The client side script has been written using pure javascript.


  3. Published: 07-Mar-2021
    You are a slow learner? and want to cover the basics that you failed to understand when you were in class X? We have a pendrive course for you that will cover all those topics, once again, in a slow manner that you will definitely be able to follow.


  4. Published: 09-Mar-2021
    In nutshell: The selection change event of the master dropdown is used to send the "id" of the selected item to the server, which sends back a collection of items for the slave dropdown. A javascript based Ajax GET request is used for this communication with the server.


  5. Published: 11-Mar-2021
    This project is about creating an Admin Panel that would be suitable for a reporting project or an EBook that shows a table of links on the left and the corresponding content on the right side. The content is obtained by an Ajax call to an ASP.NET Core application. Source code for all the three files has been given and explained below.


  6. Published: 12-Mar-2021
    THE CRUX: record types are meant for storing read-only, init-once data. They serve the purpose of ValueTypes, but in reality they are reference types; they have best of both the worlds. They, being reference types, can be efficiently passed as function arguments(like class objects), and yet they carry data like structs [though read-only] but the data doesn't get copied during function calls - this promotes efficiency. They are 2-in-1: they are RefTypes but they perform the task of ValueTypes (though read-only, init-once). So with C# 9.0 we have a triad - class, struct and record. Two different instances of records are equal if they contain the same data (like structs, and un-like the classes!) The "positional record" syntax makes it easier to create their objects, and the newly introduced "with" expressions make it even easier to create their exact copies, possibly with just-in-time alterations to some of their properties.


  7. Published: 16-Mar-2021
    In brief: Just two additions are required to implement AJAX based authorization in your existing ASP.NET Core application - first is on the javascript side - where the response code should be tested, and second on the server side where User.IsInRole has to be tested. The concept is explained in the text that follows, and a working example is described in the appended youtube video!


  8. Published: 20-Mar-2021
    Pure Javascipt and html5 based general solution for in-place or in-line editing of the tr, td records of an html table. This solution is suitable for ajax based updates of the rows of a table. We shall demonstrate the concept with just one input text, but this solution can easily be extended to include dropdowns, radio buttons and checkboxes:


  9. Published: 22-Mar-2021
    Simplest explanation of AJAX based Edit, Update, Cancel operations on a row of an HTML table. An ASP.NET Core POST handler receives the updated values that can be processed for an update to a database.


  10. Published: 23-Mar-2021
    Following are my top 6 interview questions on the "init" accessor introduced recently in C# 9. The answers have all been fully explained through code examples. All the examples have been kept as short as possible.


  11. Published: 25-Mar-2021
    Anti-forgery token is NOT available outside of <form> tags. This article, alongwith the appended video, explains how to use IAntiforgery service to solve this limitation, and POST data, especially as an AJAX request, when a full-fledged form is not possible?


  12. Published: 30-Mar-2021
    This program is for the Windows OS only. The location of the desktop folder is first obtained by using the Win32 function SHGetKnownFolderPath. Then PathAllocCombine is used to append the name of the file to obtain the path to the file. Finally, some text is written using the iostream library of C++!