What is the best method to show a simple form in a HTML page, which includes a save button that calls a web method? I’m considering one of these options:
- Toggle a hidden
<div>which includes a form with the same behaviour of the shown .aspx - Display a modal dialog using JavaScript that loads a separate .aspx to show the form.
Which is better, and under which circumstances?
If the popup content is relatively small, then it will be best to just include it right in your main page in a hidden div. This will give you instant performance when you want to display it. The reasons not to do it this way are: