English 中文(简体)
利用JQuery ASP中方言。 NET
原标题:Using JQueryUI dialog in ASP.NET

i m 试图取代标准javascript,用JQueryUI 方言确认功能。 我曾寻求解决办法,但我似乎没有任何工作。 很简单:点击伙伴关系。 显示方言的“Yes”继续使用。 现行法

    $(document).ready(function () {

        $("#confirmDialog").dialog({
            autoOpen: false,
            modal: true,
            closeOnEscape: false,
            bgiframe: true,
            open: function (event, ui) { $(".ui-dialog-titlebar-close", ui.dialog).hide() },
            buttons: {
                "Yes": function () {
                    $(this).dialog( close );
                    return true;
                },
                "No": function () {
                    $(this).dialog( close );
                    return false;
                }
            }
        });
    });

    function showDialog() {
        $("#confirmDialog").dialog( open );
        return false;
    }

ASP. NET代码:

            <asp:Button ID="DeleteButton" CssClass= button  onmouseout="this.className= button "
                onmouseover="this.className= button:hover " runat= server  Text= Delete  Width= 1in 
                Height="30px" OnClientClick="javascript:showDialog();" OnClick="DeleteSetup"/>

What s happening is that the dialog is displayed, but DeleteSetup vb.net sub is called before anything is selected in the dialog.

事先得到任何帮助或咨询。

问题回答

更改<代码>OnClientClick

OnClientClick=“return showDialog();>





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签