Currently, I am enrolled in an ASP.NET Web Forms course at my school and I have been working on incorporating a login modal into my project.
While following a tutorial from W3Schools on implementing a login form (tutorial), everything was going smoothly. However, when I replaced the standard HTML inputs with ASP inputs (such as changing from HTML input textbox
to asp.net
textbox) and removed the "required"
parameters, I encountered an issue where the modal would close within milliseconds of opening it.
After conducting some testing, I found that this issue only arose when the HTML portion of the modal was situated within the
<form runat="server">
section.
It is important to note that I am aware of the limitation that forms cannot be nested in an ASP.NET web forms form. Consequently, I made adjustments such as:
<form class="modal-content animate" action="/action_page.php">
changed to
<div class="modal-content animate">
Therefore, my query is - why is this occurring and what steps can I take to resolve this issue? Any assistance would be greatly appreciated.