background preloader

BAIS3150

Facebook Twitter

JSON

Javascript - How to store and retrieve Shopping Cart items in localstorage? How to get connection string in class library project. Working with Static Files — ASP.NET documentation. By Rick Anderson Static files, such as HTML, CSS, image, and JavaScript, are assets that an ASP.NET Core app can serve directly to clients.

Working with Static Files — ASP.NET documentation

View or download sample code Serving static files¶ Static files are typically located in the web root (<content-root>/wwwroot) folder. HTML picture tag. Responsive images - Learn web development. In this article, we'll learn about the concept of responsive images — images that work well on devices with widely differing screen sizes, resolutions, and other such features — and look at what tools HTML provides to help implement them.

Responsive images - Learn web development

Responsive images are just one part of responsive web design, a future CSS topic for you to learn. Why responsive images? How the Bootstrap 4 Grid Works - UX Planet. I will address Grid questions like these in a little while.

How the Bootstrap 4 Grid Works - UX Planet

But, first I want to take a step back to explain something very important about using the Grid. Trust me. Understanding the “Rules of the Grid” will save you a lot of time and frustration. Read them carefully… Material Design Blocks - 400+ stunning Bootstrap 4 sections. Create Razor Pages application. ASP.NET Core in Action. Introducing IHostLifetime and untangling the Generic Host startup interactions: Exploring ASP.NET Core 3.0 - Part 5.

In this post I describe how ASP.NET Core 3.0 has been re-platformed on top of the generic host, and some of the benefits that brings.

Introducing IHostLifetime and untangling the Generic Host startup interactions: Exploring ASP.NET Core 3.0 - Part 5

I show a new abstraction introduced in 3.0, IHostLifetime and describe its role for managing the lifecycle of applications, especially worker services. In the second half of the post I look in detail at the interactions between classes and their roles during application startup and shutdown. I go into quite a bit of detail about things you generally shouldn't have to deal with, but I found it useful for my own understanding even if no one else cares!

POST-REDIRECT-GET using TempData in ASP.NET Core. In this post I will show how you can use Session state and TempData to implement the POST-REDIRECT-GET (PRG) design pattern in your ASP.NET Core application.

POST-REDIRECT-GET using TempData in ASP.NET Core

Disclaimer - The technique shown here, while working very well in the previous version of ASP.NET, is not as simple in ASP.NET Core. This is due to the fact that the TempData object is a wrapper around Session which is itself a wrapper around the IDistributedCache interface. This interface requires you to serialise your objects to and from a byte array before storage, where previously serialisation was not necessary. Consequently there are some trade-offs required in this implementation, so be sure you understand the implications. What is PRG? The POST-REDIRECT-GET (PRG) design pattern states that a POST should be answered with a REDIRECT response, to which the user's browser will follow with a GET request.

Jerrie Pelser's Blog. Create a Mapbox account Mapbox is a service which allows you to embed maps in your application.

Jerrie Pelser's Blog

It is very similar to using Google Maps, but I prefer it due to its more elegant API. The first thing we need to do is to create a Mapbox account which you can do by going to Go ahead and complete the sign-up form by specifying a username, email address and password: Next, you will be taken through the onboarding process. Select Web as the SDK you want to use: On the next screen, choose to Use the Mapbox CDN: Mapbox will now present you with a small code snippet with the JavaScript and CSS we can include in our application:

Query string in .Net core and MVC 6 – Neel Bhatt. As you all know that from MVC6 we are seeing some changes in our regular coding techniques.

Query string in .Net core and MVC 6 – Neel Bhatt

We were using below lines in MVC5 for getting values from query string: var myQueryString = Request.QueryString[“myQueryString”] But in MVC6, above lines will throw errors in your code. So, you might be wondering how can we achieve this in MVC6. Below is the way: Debug a JavaScript or TypeScript app - Visual Studio. Multiple /bin folders in ASP.NET. About a week ago, Scott Hanselman posted a neat tip on deploying multiple /bin folders in an ASP.NET application.

Multiple /bin folders in ASP.NET

What's really cool about this is that it lets you build a pseudo plugin architecture into your existing ASP.NET website. Scott documents it perfectly; I'm here to tell you that I tried it, and it works. In my case the folder structure was like so: As you can see, I added a pre-compiled utility WebFileManager to the existing Linktron5000 website by dropping it into a subfolder, binaries and all. To get this to work, all I had to do was make one small change to the parent app Web.config: This sets up the probing path for the child assemblies. Note that I didn't need the additional namespace page directive because this assembly has no namespace.

Background on Identities in IIS – Demystify. Table of Contents.

Background on Identities in IIS – Demystify

Using the FOR XML Clause to Return Query Results as XML. .NET Standard - Demystifying .NET Core and .NET Standard. As the newest members of the .NET family, there’s much confusion about .NET Core and .NET Standard and how they differ from the .NET Framework.

.NET Standard - Demystifying .NET Core and .NET Standard

In this article, I’ll explain exactly what each of these are and look at when you should choose each one. Before going into detail, it’s helpful to look at the larger picture of .NET to see where .NET Core and .NET Standard fit in. When.NET Framework first shipped 15 years ago, it had a single .NET stack that you could use for building Windows desktop and Web applications. Since then, other .NET implementations have emerged, such as Xamarin, which you can use for building mobile apps for iOS and Android, as well as macOS desktop applications, as shown in Figure 1.

Stacy on CodePen. A Young Person’s Guide to C# Bond. Bond is an extensible framework for working with schematized data. It is suitable for scenarios ranging from service communications to Big Data storage and processing. Bond defines a rich type system and schema versioning rules which allow forward and backward compatibility. The core Bond features include high performance serialization/deserialization and a very powerful, generic data transform mechanism.

The framework is highly extensible via pluggable serialization protocols, data streams, user defined type aliases and more. By design Bond is language and platform independent and is currently supported for C++, C#, and Python on Linux, OS X and Windows. We are also introducing the Bond Communications framework–known as Bond Comm. Bond is published on GitHub at In Bond data schemas are defined using idl-like syntax: