110,536
社区成员
发帖
与我相关
我的任务
分享
MyMessageBox Mybox = new MyMessageBox("输入字符串",按钮类型);
Mybox.showMybox();
public MyBox(string str)
{
InitializeComponent();
retype = 0;
Label L = new Label();
L.Parent = this;
L.AutoSize = true;
this.AutoSize = true;
L.Text = str;
this.Width = L.Width + 20;
L.Location = new System.Drawing.Point(this.Location.X + ((this.Width - L.Width) / 2), (this.Location.Y + this.Height-50) / 2);
}
using System;
using System.Text;
public class MessageBox
{
private MessageBox()
{ }
public static void ShowConfirm(System.Web.UI.WebControls.WebControl Control, string msg)
{
Control.Attributes.Add("onclick", "return confirm('" + msg + "');");
}
public static void Show(System.Web.UI.Page page, string msg)
{ }
public static void ShowAndRedirect(System.Web.UI.Page page, string msg, string url)
{ }
public static void ResponseScript(string script)
{ }
}