ewdragon

导航

在c#中调出对话框实现方法

方法一:
      定义一个类

 1       using System;
 2
 3namespace GYYW.DA.GYGL
 4{
 5 /// <summary>
 6 /// Command 的摘要说明。
 7 /// </summary>

 8 public class Message
 9 {
10  public Message()
11  {
12
13   //
14   // TODO: 在此处添加构造函数逻辑
15   //
16  }

17  public string Sh(string str)
18 {
19   return string.Format("<script language={1}javascript{1}>alert({1}{0}{1});</script>",str,"\"");
20
21 }

22 }

23}

24
25
在.cs中调用

         先在前台定一个label 并隐藏。
1string s="ok";
2GYYW.DA.GYGL.Message MS =new Message();   
3 myLabel.Visible=true;
4 myLabel.Text=MS.Sh(s);

posted on 2005-11-08 16:17  六月芳菲  阅读(437)  评论(0编辑  收藏  举报