I need to insert data from textbox once submit button clicks.The data should beonly display in another page.Need to use mvc+knockoutJS.Please help I am new to mvc+knockout
What I have tried:
My view
@{
ViewBag.Title = "Questions";
Layout = "~/Views/Shared/_Layout.cshtml";
}
@ViewBag.Title
Questions :
<input type="text" data-bind="value:Math_Q1 " />
<script type="text/javascript" src="~/Scripts/app/Test.js"></script>"
<script src="~/Scripts/knockout-2.3.0.js"></script>
My Model class as follows;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace SelfAssesmentTest.Models
{
public class TestResultsModels
{
public int Math_Q1 { get; set; }
}
Control Class
using System.Threading.Tasks;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using SelfAssesmentTest.Models;
namespace SelfAssesmentTest.Controllers
{
public class SelfController : Controller
{
// GET: SelfAssesment
public ActionResult Index()
{
return View();
}
}