I want to create a simple list of string in view, submitted from textbox, using submit button, without using model, using razor. I want that on every submit a new string in the list is created. I am trying the following code but it just creates one string in the list :
JavaScript
@{
ViewBag.Title = "Index";
}
Index
Message:
@{ var message = "";
if (IsPost)
{
message = Request["message"];
@message
}
}

Nitin SontakkeRank #264 · 9.6K reputationPosted Dec 23, 2021, 12:36 AM EST
Nitin SontakkeRank #264 · 9.6K reputationPosted Dec 23, 2021, 12:38 AM EST
Rijwan AnsariRank #82 · 24.2K reputationPosted Dec 23, 2021, 5:55 AM EST