Bootstrap navbar is awesome for adding a navigation line and having it collapse to a button for a small screen. However, navbar is also useful when you don’t want it to collapse, but, instead, to change its orientation from horizontal to vertical and back when the screen size changes. Here is the code to acheive […]
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: […]
Ensuring important information below an image is visible.
In creating responsive web sites, we sometimes want to put a photo at the top of the page, but still ensure that the user sees important text below the photo at first glance. Otherwise, the user might not know that there is important information he should scroll to. We can use flex boxes and viewport […]
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 […]