Skip to main content

ASP .NET Core Website with VS 2019 IDE

Welcome back Readers, here this article we’ll learn about, how to create a Website using Microsoft Visual Studio IDE (note: it is now the Text Editor Visual Studio Code). We’re going to use Visual Studio 2019 Community Edition for Windows.

So, let’s get started by opening Microsoft visual studio. And if you haven’t downloaded the software then click here to setup the development environment. I’ve enabled the Dark theme, why cause I like it 😀, you’re free to select a theme of your choice.

  1. After opening Visual Studio, click on Create a New Project
  2. On the next screen, Search for “Web” in the top given search bar and then select ASP.NET Core Web Application, then simply click on Next
  3. Give your project a name, then click on Next
  4. On the next screen, Keep the setting s as it as and select Web Application from the choices, then again click on Next.
  5. You’ll see something similar to the below image, the theme might be different. 😅
  6. Let’s understand the directory structure a bit, that what folder contains what files:
    1. wwwroot: It is the folder which contains static files for the website, which contains those files which doesn’t changes much.
    2. Pages: It contains files that would be used to render the pages dynamically.

  1. Now let’s run the application, by pressing the ‘F5’ key or simply click on the “IIS Express” Button on the top
  2. Great it’s working now, so stop the application from Visual studio and then navigate to the file named: Index.cshtml present in the Pages Folder from the Solution Explorer.
  3. Now let’s change some text in this file (Note: I’ve activated the Word wrap in my demo, press, “ctrl+E+W”):
    1. <H1>: Test Web Application
    2. <p>: This application is made from Visual Studio 2019 Community Edition.

  1. Now let’s run the application, but this time we’ll do it without debugging, press “ctrl+F5”. Or we can simply go to the Debug Menu> Start without debugging.

  2. Let’s see the output now
  3. Now let’s change the footer itself and add year as the Dynamic year using JavaScript as we don’t want to change the year every year. Navigate to the file “_Layout.cshtml” present in Shared> Pages from the Visual Studio.
  4. Place the below code in place of 2020:
    1. “ @DateTime.Now.Year ”

  1. This will apply a dynamic date according to the current year at the system of the Client/ User.

Comments

Popular posts from this blog

Creating a URL Shortener Deplyment on Azure (NodeJS) part-2

For reference to the previous post, please refer to this link : Connecting-to-our-Database Now let's head to the package that we added config in the npm install command, what it does is that it will look for default.json the file inside config (folder) which we created earlier that will consist of the global variables for our project. Now let's open that default.json file and place the below snippet in it: { "mongoURI": "<ConnectionStringHere>" } We'll replace the Connection String from the cluster's string from our Atlas Account (if you still don't have an account, click here to create one) After Logging in to the Atlas, create a free Cluster and add a database user in it Now use the below code in the db.js the file inside the config (folder): const mongoose = require('mongoose'); const config = require('config'); // Grab the Connection string URL from the default.json file const db = confi
Post-Event Resources- Ai Gaming with Microsoft Azure Heya  Folks hope you enjoyed the Event, do let us know in the comment section about your experience. As said, Here are the Post Event Resources for your continual Learning... Basic Concept of Ai (Theory) AI in Video Games: Toward a More Intelligent Game What is an API Open-Ai 5 Article Microsoft Cognitive- Getting started with Azure Cognitive Services Bundled Playlist on Youtube Microsoft Cognitive Vision Service- Try for Free online Some Videos by Siraj:  OpenAI Five vs Dota 2 Explained How to Install OpenAI's Universe and Make a Game Bot    How to Make an Amazing Video Game Bot Easily Hope you find the Resources resources... For folks interested in Microsoft Azure ML, Click Here

Signing Up for Azure 4 Students Account

Sign-Up: Microsoft Azure 4 Students Hola readers, In this post we're gonna learn how to create a new Microsoft Azure Account for Students. As a typical Azure account requires you to provide with the Credit Card details but due to the fact that not all the students around the globe have credit cards. So Microsoft have a provision for granting Azure Credits to students by the help of their Educational Account provided by their School/ Universities. Here are the steps provided to create a new Azure4Students Account (Though a video is also available to follow along): Text version of the SigningUp Process Visit: aka.ms/Azure4Students Sign in with your Microsoft Account or create a Microsoft Account if you don't have one After successfully logging in, enter your Country code & mobile number. Then click on the Verification options (Text/ Call) for your Identity verification. Next comes the Student Verification. This can be done by either: Providing your scho
Counter Widget