Posts

Showing posts from July, 2020

How to get Array value in Angular ?

How to get Array value in Angular ? , ANGULAR WITH CORE .NET AND MVC RAZOR ENGINE How to get Array value in Angular? In this article we will learn , How to get array value in Angular . Step 1 : Create a new Angular Project using below command ng new angular-tour-of-heroes Step 2 : Create a new component using below command ng generate component how-to-get-array-value-in-angular Step 3 : Add Below code in how-to-get-array-value-in-angular.component.ts import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-how-to-get-array-angular', templateUrl: './how-to-get-array-angular.component.html', styleUrls: ['./how-to-get-array-angular.component.scss'] }) export class HOWTOGETArrayAngularComponent implements OnInit { fruits = ['Apple', 'Orange', 'Banana', 'blackberry', 'blackcurrant', 'blueberry', 'cherry' , 'coconut'

How to create XML file dynamically in c#.net?

Image
How to disable table row in Angular ? , ANGULAR WITH CORE .NET AND MVC RAZOR ENGINE How to create XML file dynamically in c#.net? In this article we will learn , How to create dynamic file in c#.net using ASP.NET CORE C# Step 1: Let's create a solution to implement How to create XML file dynamically in c#.net? File -> New -> Project -> ASP.NET Core Web Application -> Next -> Enter file name and click create Step 2: Create a new action method in Home controller and create a view and add below html code in view @{ ViewData["Title"] = "Generate XML File"; } @ViewData["Title"] We will use this page to generate XML file. Step 3: Create a new action like below and have a look on below Code [HttpPost] public IActionResult GenerateXMLFile(string action) { if (!string.IsNullOrEmpty(action)) { string xmlData = generateFile(); string xmlString = xmlData; string f