Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Label1.Text = mydb.RandomNum(4);
     }
 }
Пример #2
0
 CommDB mydb = new CommDB();                          //创建CommDB对象
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)                            //在网页首发时执行
     {
         Label1.Text = mydb.RandomNum(4);
     }
     else                                             //回传时应保存密码
     {
         TextBox2.Attributes.Add("value", TextBox2.Text);
     }
 }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Label1.Text = mydb.RandomNum(4);
     }
     else
     {
         TextBox2.Attributes.Add("value", TextBox2.Text);//回发时保持密码
     }
 }
Пример #4
0
 protected void Button3_Click(object sender, EventArgs e)
 {
     Label1.Text = mydb.RandomNum(4);
 }