I dynamically change DOM on client-side to add some new input fields using JavaScript.
Can I obtain the data on the server-side without using Ajax? Just pushing send but
If you're posting the form, sure. You can use either the FormCollection to get the element you want, or explicitly identify the parameter in your method signature. Assume you added an input element with the name "myTextBox", you could do the following:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(int id, string myTextBox, FormCollection collection) {
// better
if (myTextBox != null) {
// do something with the string
}
// good
if (collection["myTextBox"] != null) {
string textboxvalue = collection["myTextBox"].ToString();
}
}