ASP.NET应用程序的Coolite确认控件 [英] Coolite confirmation control for asp.net application
本文介绍了ASP.NET应用程序的Coolite确认控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨专家
我想要一个带有Ext.Msg.Confirm的确认消息框:
如果用户单击否",则停止运行其他代码,如果是",则执行其他代码.
我是这样做的:
hi experts
I want a confirmation messagebox with Ext.Msg.Confirm:
if user clicks on No then stop running other code and if Yes then other code execute.
I did this:
protected void SendSms_Click(object sender, AjaxEventArgs e)
{
Ext.Msg.Confirm("Are you sure?", new Coolite.Ext.Web.MessageBox.ButtonsConfig
{
No = new Coolite.Ext.Web.MessageBox.ButtonConfig
{
Text = Resources.HASResource.Yes,
// ???
},
Yes = new Coolite.Ext.Web.MessageBox.ButtonConfig
{
Text = Resources.HASResource.No
//???
}
}).Show();
// other code
}
但我不知道该如何处理.我尝试了Handler
,但没有运行
请帮助
谢谢.
but I don''t know how to handle it. i tried Handler
but it doesn''t run
please help
thank you.
推荐答案
你好
将类似的内容添加到Handler
:
Hello
Add something like this, toHandler
:
Ext.Msg.Confirm("Are you sure?", new Coolite.Ext.Web.MessageBox.ButtonsConfig
{
No = new Coolite.Ext.Web.MessageBox.ButtonConfig
{
Text = Resources.HASResource.Yes,
Handler = "Coolite.AjaxMethods.MyMethod(myParameter)"
},
Yes = new Coolite.Ext.Web.MessageBox.ButtonConfig
{
Text = Resources.HASResource.No
//???
}
}).Show();
// other code
然后添加如下方法:
Then add the method like this:
[AjaxMethod]
public void MyMethod(string parameter)
{
//...
}
我认为可以.
I think it works.
这篇关于ASP.NET应用程序的Coolite确认控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文