How to connect a script?
Have I connected the script correctly?
Used by:
ASP.NET Core
I want to implement an example - https://jsfiddle.net/
I start debugging without a server.
Model1.cs
namespace WebApplCore.Models
{
public class Model1
{
public int ID { get; set; }
public string Title { get; set; }
}
}
HomeController.cs
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using WebApplCore.Models;
namespace WebApplCore.Controllers
{
public class HomeController : Controller
{
public IActionResult Index()
{
List<Model1> Items = new List<Model1>();
Items.Add(new Model1() { ID = 1, Title = "Title 1"});
Items.Add(new Model1(){ ID = 2, Title = "Title 2"});
Items.Add(new Model1(){ ID = 3, Title = "Title 3"});
return View(Items);
}
}
}
Member
10 Points
29 Posts
How to connect a script?
May 26, 2020 10:28 AM|frmasp897654|LINK
How to connect a script?
Have I connected the script correctly?
Used by:
ASP.NET Core
I want to implement an example - https://jsfiddle.net/
I start debugging without a server.
Model1.cs
HomeController.cs
Index.cshtml
Member
10 Points
29 Posts
Re: How to connect a script?
May 26, 2020 04:01 PM|frmasp897654|LINK
Added by
The script works.