I had a previous question a few weeks ago that I now understand the answer to, however now I am wanting to take it one step further.
Here are the models I am working with:
public class Test {
public string author {get;set;}
public list<TestItem> testItems {get;set;}
}
public clas TestItem{
public string question {get;set;}
public string answer {get;set}
}
I have handed my view something like this (A test with 4 items on it) in my previous projects:
Test model = new Test()
{
Test= new List<TestItem>()
{
new TestItem() { },
new TestItem() { },
new TestItem() { },
new TestItem() { }
}
};
return View(model)
Where I could in my get method in my controller create a test and a SET number of test items to go into that test. HOWEVER, lets say that I want my user to determine how long a test can be, perhaps 3 questions, perhaps 33 questions. HOW can i determine the number of testItems on the client side?