-----后台

usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;publicpartialclass_2_简单交互对话框_Default:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){}protectedvoidButton1_Click(objectsender,EventArgse){ShowDialog("删除成功");}///<summary>///弹出模式1(服务端按钮)///</summary>///<paramname="msg">弹出的内容(必填)</param>///<paramname="asyn">true则为ajax模式(选填)</param>///<paramname="key">key值(选填)</param>publicvoidShowDialog(stringmsg,stringicon="",boolasyn=false,stringkey=""){stringdialog=string.Format("art.dialog.alert('{0}','{1}')",msg,icon);if(!asyn)ClientScript.RegisterStartupScript(this.GetType(),key,dialog,true);elseScriptManager.RegisterClientScriptBlock(this.Page,typeof(string),key,dialog,true);}}

-----前台

<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="Default.aspx.cs"Inherits="_2_简单交互对话框_Default"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title></title><style>body{font-size:75%;color:#666;font-family:'MicrosoftYahei',Tahoma,Arial!important;font-family:'宋体',Tahoma,Arial;}</style><scriptsrc="../artDialog/jquery-1.4.2.min.js"type="text/javascript"></script><scriptsrc="../artDialog/artDialog.js?skin=default"></script><scriptsrc="../artDialog/ZD.artDialog.js"type="text/javascript"></script><scriptsrc="../artDialog/plugins/iframeTools.source.js"type="text/javascript"></script><scripttype="text/javascript">functiondome1(){art.dialog.alert('人品越来越不那么稳定了,请检查!',"warning");}functiondome2(){art.dialog.confirm('你确定要删除这掉消息吗?',function(){art.dialog.tips('执行确定操作');},function(){art.dialog.tips('执行取消操作');},"succeed");}functiondome3(){art.dialog.prompt('请输入图片网址',function(val){art.dialog.tips(val);},'http://');}functiondome4(){art.dialog.tips('数据正在提交..',2);art.dialog.tips('成功!已经保存在服务器');}</script></head><body><formid="form1"runat="server"><inputtype="button"value="案例1"onclick="dome1()"/><inputtype="button"value="案例2"onclick="dome2()"/><inputtype="button"value="案例3"onclick="dome3()"/><inputtype="button"value="案例4"onclick="dome4()"/><br/><asp:ButtonID="Button1"runat="server"Text="服务端按钮"OnClick="Button1_Click"/></form></body></html>

----dome1

----dome2

----dome3

----dome4

----服务器按钮

源代码下载地址:http://down.51cto.com/data/1968050
技术学习群(发展中,群成员免费提供资源。欢迎大家加入):426634651