Ext.Net.X.MessageBox'是'属性',但用作'类型'

时间:2013-06-10 11:18:43

标签: ext.net

在实现此代码并构建项目时,我得到了类似的错误。

错误3'Ext.Net.X.MessageBox'是'属性',但用作“类型”

我做错了吗? (我使用visual studio和.net4框架)

  X.Msg.Confirm("Message", "Confirm?", new X.MessageBox.ButtonsConfig
            {
                Yes = new X.MessageBox.ButtonConfig
                {
                    Handler = "CompanyX.DoYes()",
                    Text = "Yes Please"
                },
                No = new X.MessageBox.ButtonConfig
                {
                    Handler = "CompanyX.DoNo()",
                    Text = "No Thanks"
                }
            }).Show();  

1 个答案:

答案 0 :(得分:1)

请使用:

X.Msg.Confirm("Message", "Confirm?", new MessageBoxButtonsConfig()
{
    Yes = new MessageBoxButtonConfig()
    {
        Handler = "CompanyX.DoYes()",
        Text = "Yes Please"
    },
    No = new MessageBoxButtonConfig()
    {
        Handler = "CompanyX.DoNo()",
        Text = "No Thanks"
    }
}).Show();