I was looking for a quick and dirty way to filter a table that I got as the result of a search on a webpage. For a one-time effort, I could print it to a pdf. However, I wanted to only keep certain rows in that table. I could load it to an excel […]
Category: C# examples
C# Examples
Add a QR code to your website using asp.net
Sometimes a QR code is the easiest way to direct people to your website. QR codes can be used in many ways. QR code on your restaurant table to open a menu QR code on an electoral campaign postcard to open more information about a candidate QR code to open the playbill for a play […]
Using ajax to submit an array to an asp.net page
The following submits an array of strings to an asp.net razor page for handling. It is not straightforward how to submit an array for processing. You have to first stringify it before sending with ajax. Once it is received, you have to then deserialize it into a List.. Suppose you have an array of strings: […]
Example of copying a file to another folder on a Razor page
If you want to copy files between folders on Razor pages, open each file as a FileStream and use the CopyTo method. I created a new IActionResult called OnGetChangeFolder() that resides in my Index page code. To execute it, I call https://example.com/?handler=changefolder I have a folder of cities, each one identified by its name. In […]
Example of adding a spinner to a fetch on a react site
If you need to fetch data from a server while the user is viewing a webpage, you need to give the user an indication that the fetch is occurring and that the webpage is not frozen. Spinners are the perfect solution. You can show the user spinning circles, dots, bars, hearts and any other type […]