Answer the question
In order to leave comments, you need to log in
How to submit a form with the same name attribute?
My addField() function adds a new field, the same as in div="field", just duplicates it after it. Question! how do i send the form data to the c# asp.net server if the "name" attribute is the same in the newly created field. In addition, you can click on the "Add field" button several times. How to be here?
<form>
<div class="field">
<input name="Name" placeholder="Заголовок поля">
<select name="select">
<option value='textarea'>Один из списка</option>
<option value='input'>Текст-строка</option>
</select>
</div>
<input type="submit" value="Добавить поле" onclick="addField(this);">
<input type="submit" value="Сохранить">
</form>
Answer the question
In order to leave comments, you need to log in
Each input name="Name", because div is only responsible for the markup, it does not affect the send data. Well, at the reception ala
or
string[] names = Request.QueryString.GetValues("Name");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question