This is a unique challenge, and despite my efforts to find a solution in various sources, I couldn't overcome this specific scenario.
I want the user to input multiple values into a single text field, like this:
<div style="margin-left: 5px; display: block;">
<div id="divTemplateLine" style="display: none;">
<a href="javascript:" onclick="javascript: RemoveLine(this);">x</a>
</div>
</div>
With Javascript, clicking the Add button should clone divTemplateLine and incorporate the text within the parent node. This part is working smoothly for me.
Now, I am faced with the task of retrieving all these lines (salmon, soup, miso, Japanese) during postback. It seems like I might have to delve into parsing HTML since these added divs are not set as "runat" server.
A possible solution could involve using a server-run hidden value that JavaScript can continuously update. While this method is effective, I am curious about parsing out HTML elements and nodes similar to what I accomplished in JavaScript, especially since my actual situation involves more complexity than a single value, making a hidden value less suitable.
I would appreciate any suggestions or insights on this matter.