button on modal dialog not working
I've put an asp.net button on a modal dialog box that will appear once a certain option is clicked.
I want to call a .net subroutine once the button is clicked as normal but because I'm guessing it's in modal in won't foolw through to the subroutine or the click has no affect.
Is there a way around this?
Thanks,
var dlg = jQuery("#dialog2").dialog({
bgiframe: true,
autoOpen: false,
height: 410,
width: 800,
开发者_StackOverflowmodal: true,
show: 'Transfer',
hide: 'Transfer',
draggable: true,
resizable: true
});
The button is a standard which doesn't click add go through the appropriate code behind the button.
<div style="width: 743px">
<asp:Button ID="btnNoteSave" runat="server" Text="Save" class="button_class" />
</div>
If it's a standard ASP.NET Button, it will still work, so long as your event handlers are setup correctly, however it may not behave as desired, i.e. Model popup will not persist.
May I suggest some AJAX and ASMX/WCF/JayRock?
I got this working by changing it all to:
$("#dialog2").dialog({
bgiframe: false,
autoOpen: false,
height: 410,
width: 800,
modal: true,
draggable: true,
resizable: true
});
$("#dialog2").parent().appendTo($("form:first"));
It does allow me to just use the method behind the
精彩评论