Main Content

Please wait...

Simple way to handle HTTP status error in ASP.NET core

You can simply handle http status error like HTTP 404 error and any other http status error in ASP .NET by using this simple solution. HTTP 404 is one of the must common error in ASP .NET when the requested error is not found . We can solve the problem by adding some code in the configure() method in Startup.cs class which is also the entry point for the application itself. In the configure function we define and add a custom middleware with ‘app.Use’ which will check for status c ....Read More
ASP.NET Core: CRUD Operation with ADO.NET Here we are going to discuss about how to perform the Create, Read, Update and Delete also called the CRUD operations in Asp.Net Core with ADO.NET. We will be creating a sample Customer record in order to perform the CRUD operation. Prerequisites Install .NET Core 2.0.0 or above SDK Install Visual Studio 2017 Community Edition (Version 15.3.5 or above) Install SQL Server Creating Table and Stored Procedures We now will be using a Database tab ....Read More

How to crop and upload image in ASPNET core using Jcrop?

Jcrop Plugin is an efficient way of adding image cropping functionality to our web application. I was searching for an efficient way to Crop the image in my web application until I came along with Jcrop. In this article, I will show you how I implemented the Cropping functionality in my ASPNET core web application. I hope it will be a great help for anyone who has the same problem. Let’s get started by creating a new .net core web Application. I assume you know how to do it. If not Fol ....Read More

Complete Array: Tricky Question Solution in C#

Complete Array: An array is defined to be complete if the conditions (a), (d) and (e) below hold. a. The array contains even numbers b. Let min be the smallest even number in the array. c. Let max be the largest even number in the array. d. min does not equal max e. All numbers between min and max are in the array For example {-5, 6, 2, 3, 2, 4, 5, 11, 8, 7} is complete because a. The array contains even numbers b. 2 is the smallest even number c. 8 is the largest even number d. 2 does ....Read More

Magic Array:Tricky Question Solution in C#

Q.) An array is defined to be a Magic array if the sum of the primes in the array is equal to the first element of the array. If there are no primes in the array, the first element must be 0. So {21, 3, 7, 9, 11 4, 6} is a Magic array because 3, 7, 11 are theprimes in the array and they sum to 21 which is the first element of the array. {13, 4, 4, 4, 4} is also a Magic array because the sum of the primes is 13 which is also the first element. Other Magic arrays are {10, 5, 5}, {0, 6, 8, 20} and ....Read More

Difference Between Asp.Net and Asp.Net Core Framework

Everything has been changing in this world and likewise the frameworks of .Net Platform. The .Net is the technology provided by the Microsoft to simplify the software development. And Its frameworks have been updating time to time. The most recent one is core 3.0 preview 1. Both are the Frameworks provided by .Net platform to build the server-side applications. Both Frameworks are based on C# Programming language so we can exchange the code across. However, there is difference in fundame ....Read More
Middleware is software that’s assembled on the application pipeline to handle request and responses over the pipeline.Middleware has access to both request and response. Middleware can process and pass the request to next middleware .Middleware can handle the request and short-circuit the pipeline. It can process outgoing response .Middleware is used to execute according to their own arrangement. Middleware can be of static page or dynamic so middleware mainly is used to call next middlewa ....Read More

Difference between ASPX and Razor View Engine in .Net

View Engine in .NET is responsible for rendering your code into good looking Interface. MVC uses the views to locate and render the views we are requesting from the controller through asp action. Views can contain server controls, html tags and can have programming code. There are many view engine available like ASPX Razor Spark NHaml NDJango Hasic and many more But most of the programmers prefer to user Razor view due to its convenience There are Two View Engines used in Dot NET Fr ....Read More

How to return View as PDF in .Net core ?

Portable Document Format(PDF) as the name refers is a file format which presents documents in a manner independent of software , hardware and OS. PDF format is very important for printing the document and information. We can display the content in our webpage in a pdf format which makes it easier to print rather than displaying it in an usual normal web page. Suppose We have a condition where we need to print the invoice or bill to the user from our system then there is a simple way for doing ....Read More

Regular Expression: A simple way for string manipulation

Logical operation on data especially in the web where we have HTML, CSS, Script in mixed form (mixed data), at the same time we need to find meaning full data with mixed nature of data is a complex operation. In order to have better performance doing so, we will have a regular expression which can help us. What is Regular Expression? A nice definition from Wikipedia is, "A regular expression, regex or regexp (sometimes called a rational expression) is a sequence of characters that define a sea ....Read More