I have an ASP.NET application that also uses jQuery for modal pop-ups. If I put an ASP button (or image button) within the DIV for the jQuery modal, the “OnClick” event does not fire.
How can I fix this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you create the dialog, you need to move it a bit for ASP.Net, like this:
By default the
.dialog()moves the content to just before</body>which most importantly is outside the<form></form>, so elements within it won’t be included in the POST (or GET) to the server. If you manually move it like I have above, it’ll resolve this issue.