jQuery UI Dialog with ASP.NET button postback

前端 未结 17 2135
鱼传尺愫
鱼传尺愫 2020-11-22 14:43

I have a jQuery UI Dialog working great on my ASP.NET page:

jQuery(function() {
    jQuery(\"#dialog\").dialog({
        draggable: true,
        resizable:          


        
17条回答
  •  生来不讨喜
    2020-11-22 15:14

    This was the clearest solution for me

    var dlg2 = $('#dialog2').dialog({
            position: "center",
            autoOpen: false,
            width: 600,
            buttons: {
                "Ok": function() {
                    $(this).dialog("close");
                },
                "Cancel": function() {
                    $(this).dialog("close");
                }
            }
        });
    
    dlg2.parent().appendTo('form:first');
    $('#dialog_link2').click(function(){
        dlg2.dialog('open');
    

    All the content inside the dlg2 will be available to insert in your database. Don't forget to change the dialog variable to match yours.

提交回复
热议问题