Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
C# 7 and .NET Core 2.0 Blueprints

You're reading from   C# 7 and .NET Core 2.0 Blueprints Build effective applications that meet modern software requirements

Arrow left icon
Product type Paperback
Published in Mar 2018
Publisher
ISBN-13 9781788396196
Length 428 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
 Strauss Strauss
Author Profile Icon Strauss
Strauss
 Rademeyer Rademeyer
Author Profile Icon Rademeyer
Rademeyer
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Title Page
Copyright and Credits
Dedication
Packt Upsell
Contributors
Preface
1. eBook Manager and Catalogue App FREE CHAPTER 2. Cricket Score Calculator and Tracker 3. Cross Platform .NET Core System Info Manager 4. Task Bug Logging ASP .NET Core MVC App 5. ASP.NET SignalR Chat Application 6. Web Research Tool with Entity Framework Core 7. A Serverless Email Validation Azure Function 8. Twitter Clone Using OAuth 9. Using Docker and ASP.NET Core 1. Other Books You May Enjoy Index

Creating a client


As mentioned in our Project Layout, the client will consist of JavaScript functions for sending messages to and receiving message from the server, and HTML elements for display.

  1. In your project, add a new folder under wwwroot, called scripts:

Remember that the node_modules directory that was created for us by our npm command earlier?

  1. Navigate to the following path within the node_modules directory:

\@aspnet\signalr-client\dist\browser

Take a look at the following screenshot:

  1. Copy the signalr-client-1.0.0-alpha2-final.min.js file to the scripts folder we just created in our project. We will be referencing this library within our HTML file, which we will create now.
  2. Add an HTML page to the wwwroot folder. I've named mine index.html. I'll recommend naming yours the same. I'll explain later:

We'll keep the client page really simple. I'm using div tags as panels to show and hide the different sections on the page. I'm also using bootstrap to make it look nice, but you can design it...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images