Step by step migration of ASP.NET Core 2.2 to 3.1

In order to upgrade/migrate asp.net core version to 3.1 following steps to be perform.
Download and install Visual Studio 2019 version 16.4 or higher.Download and install .NET Core 3.1  https://dotnet.microsoft.com/download/dotnet-core/3.1Upgrade the projects of solution to .NET Core 3.1 , because ASP.NET Core 3.1 requires it.Update existing Nuget packages to a version compatible with ASP.NET Core 3.1 in each projectUse IHost interface from a IHostBuilder instead of building and running a IWebHost from a IWebHostBuilder in Program.cs public static IHostBuilder CreateWebHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseKestrel() .UseSerilog() .UseStartup<Startup>(); }) Change AddMvc method has been replaced by AddControllers in Startup.cs of each projects.In Startup.cs,UseMvc method to be replaced by…

Javascript keaboard events for function keys f1 to f12

Using the function keys in a web application is a dicey situation.  Several of the keys have specific uses in the browser and these keys should be avoided at all costs.  Additionally, the keys all have a semantic meaning in the UI standards of various operating systems.  But if you insist on using function keys, here’s a handy matrix for how they map and what events they can be used from.



Key Windows Semantic Meaning onKeyDown onKeyPress* onKeyUp Notes
F1 Help 112 112 N/A Don’t use this, it will open the browser’s help regardless of the way you process this key.
F2 Undo 113 113 113
F3 Redo 114 114 N/A
F4 New 115 115 115
F5 Open/Refresh N/A N/A 116 Don’t use this… ever.  It always refreshes the browser and this functionality cannot be overridden.
F6 Close 117 117 N/A
F7 Reply 118 118 N/A In Firefox this brings up the dialog to turn off caret browsing.  You should avoid this key.
F8 Forward 119 119 119
F9 Send 120 120 120
F10 Spell 121 121 121
F11 Save/Full Screen 122 122 122 DON’T USE THIS!  This causes the browser to go full screen (just about all browsers have this now).  The semantic meaning of Save should be transferred to F6 which is semantically Close by default.
F12 Print 123 123 123

* IE does not support the onKeyPress event for function keys!

You’ll notice several keys don’t show up in the onKeyUp event.  I have no idea why this behavior exists.

Comments

Popular posts from this blog

Restore the lost focus of Auto post back controls in asp.net update Panel control

Add Comma automatically while entering amounts in textbox using Javascript

Devexpress Datebox date formatting in angular 6 with example