Caching is a technique very important to help the web page load faster. It helps increase the UX (user experience) of the user. To cache data, I will introduce In-memory cache in Asp.net Core to help you cache very fast and easy.
When the first time a user requests to load a web page, to get data and respond to the browser, we have to connect to the database to get data. And then we will put this data to cache. In-memory cache will store data in the server’s memory (RAM). From secondary request data will not get from the…
1. Installing Vim editor on Ubuntu.
2. Using Vim mode.
3. Create a file using the Vim editor.
4. Open the file to edit with Vim editor.
5. How to save changes in Vim editor.
5.1 Save and quit Vim editor.
5.2 Save file but without quit Vim editor.
5.3 Quit Vim editor but without save change file.
6. Clone and rename file with Vim editor
Please note that in this article I only guideway to manipulation with Vim editor in Ubuntu Linux.
By default, you need to open a terminal or login to the remote Ubuntu server…
To explain the problem of dependency injection in asp.net core, I provide an example below:
I need to create an application to manage the students of a class in the school. We have many actors such as Student, Class, School…
Now I will create an interface of Student actor and a class to implement this interface (this is a class in the data access layer — DAL).
public interface IStudentDal
Dung Do Tien - Jun/03/2020
We have selected 17 frequently asked questions in the CSS interview to help you synthesize your knowledge of CSS and prepare well for your interview. We hope it helpful to you.
The box-sizing property defines how the width and height of an element are calculated (related to the box model in CSS).
As you know by default:
- Width of an element = border left + padding left + width of content + border right + padding right. …
We have many ways to add CSS to Html page but each way has its own advantages and disadvantages. So what is the best way to increase the page loading speed? Let’s find out together.
This is the most popular way to add css to html web page. We will separate css to another file with the .css extension. This file can contain large css define and you can import css file to many html pages. To add css file to html page, html support <link> tag to help import a css file. You can use multiple <link> tags to…
Okay, I will example and explain the advantages and disadvantages of each way.
Example: I want to display box information show “Hello world” when I click onto…
In all versions of .net, we also see they have config files. From WebForm to MVC 4 we have a web.config file format in XML syntax, this file is very important to config value for some package, version, connection string and custom config value to use when an application running. When we code we have many values needed to fix and use it in more like code but it’s not constant to hand code. If you hand-code it, it will be hard to change when the application is running, also related to maintaining source code. Such as metadata information of…
In this article, I will guide you on how to bundle, minification and gzip static files in ASP.Net Core (all versions). With a web application, the performance load page is very important so we need to reduce page size to make the website load faster. To reduce page size we have many things to do eg: custom img, bundle Js, CSS, hosting, server… But in this article, I only guide to bundle js and CSS files.
We need a visual studio editor to code. I will use VS2019 to create this example. You can use a lower version.
If you are a programmer and familiar with CSS, you must know a very simple technique that is how to center a div in CSS?
To center align a div or any tag in CSS is often doing when you write code HTML and CSS. In this article, I will show you 6 ways to center a div in CSS. I only get the div tag to make an example, you can apply this solution for the same tags.
Explain some rules call:
In the past, when designing websites, we only designed for a screen that is the desktop device, but today the number of smartphone users accounts for the majority, so this type of design does not meet the needs of users. We need to design a responsive website not only for the desktop device but also for the mobile and some other devices.
Responsive web design means creating a website with an interface that is compatible with all screen sizes. For example, a website that can display well without being broken, clear and easy to use on desktop, tablet, mobile, etc…