Most dialogs take your content, wrap it, and put the result directly in front of </body>the page ... this is a problem in ASP.Net because outside <form></form>it must be inside to be included in POSTed data.
When you create a dialog box, make it added internally <form>when it ends instead <body>, for example, this is what you would do with the jQuery UI dialog box :
$("#myDiv").dialog({ ...options... }).parent().appendTo("form:first");
Now that he has been moved inside <form>, he should post the message correctly.
source
share