'vb點(diǎn)虐 代碼如下:
成都創(chuàng)新互聯(lián)專注于趙縣企業(yè)網(wǎng)站建設(shè),成都響應(yīng)式網(wǎng)站建設(shè)公司,商城網(wǎng)站建設(shè)。趙縣網(wǎng)站建設(shè)公司,為趙縣等地區(qū)提供建站服務(wù)。全流程按需制作網(wǎng)站,專業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,成都創(chuàng)新互聯(lián)專業(yè)和態(tài)度為您提供的服務(wù)
for integer i = 1 to 9 '這兩句是大的齒輪帶著小的齒輪滾動(dòng)
for integer j = 1 to 9
Response.Write(i * j)
'Response對(duì)象可以進(jìn)行頁面輸出操作,你也可以在頁面中定義一個(gè)label控件,用label1.text=CStr(i*j)來代替這句
next j
next i
'取消注釋的代碼,以便復(fù)制粘貼
for integer i = 1 to 9
for integer j = 1 to 9
Response.Write(i * j)
next j
next i
告訴你原理吧,要實(shí)現(xiàn)郵箱激活其實(shí)就是解決服務(wù)器上發(fā)郵件的問題,用戶注冊(cè)后,把用戶狀態(tài)默認(rèn)成未激活,然后生成一個(gè)鏈接到一個(gè)頁面,在那個(gè)頁面加載時(shí)運(yùn)行一個(gè)SQl語句把用戶狀態(tài)改成激活,然后再跳轉(zhuǎn)到什么成功激活的頁面就可以了,當(dāng)然要傳遞一些有效的參數(shù)了;郵件激活的話就給注冊(cè)時(shí)用戶填寫的郵箱發(fā)信就可以了,內(nèi)容里面寫上那個(gè)自動(dòng)生成鏈接,怎么發(fā)郵件呢,建議你使用第三方控件Jmail不錯(cuò),當(dāng)然還有別的,如果用Smtp協(xié)議發(fā)的話20封左右就掛掉了···
找回密碼一樣,用戶回答對(duì)密保問題的話就把密碼給他發(fā)到郵箱就是了,歸根結(jié)底還是發(fā)郵件···
補(bǔ)一句:源碼的沒有····
下面這段代碼,是我用來計(jì)算每個(gè)月存500元進(jìn)銀行,連續(xù)30年,最后連本帶利能有多少錢。這里面涉及復(fù)利計(jì)算。界面中右邊的文本框用來輸出每一次計(jì)算的結(jié)果。
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
? Dim nianxian As Integer '年限變量
? Dim dingcun As Integer '定存變量
? Dim fuli_big As Long '大復(fù)利
? Dim fuli_small As Long '小復(fù)利
? Dim i As Integer '循環(huán)變量
? Dim DATAstring As String '數(shù)據(jù)字符串
? nianxian = Val(年限_TextBox.Text)
? dingcun = Val(定存_TextBox.Text)
? DATAstring = ""
? For i = 1 To nianxian
? ? ? fuli_small = dingcun * (1 + 0.1875)
? ? ? dingcun = fuli_small
? ? ? fuli_big = fuli_big + fuli_small
? ? ? DATAstring = DATAstring + "[" + Trim(Str(i)) + "]" + Str(fuli_big) + Chr(13) + Chr(10)
? ? ? 'DATAstring = DATAstring + "[" + Trim(Str(i)) + "]" + Str(fuli_small) + Chr(13) + Chr(10)
? Next
? 'fuli_big = fuli_small
? TextBox1.Text = DATAstring
? 結(jié)果_TextBox.Text = Str(fuli_big) + "元"
End Sub
protected void lkbtLogin_Click(object sender, System.EventArgs e)
{
if(txtVerifyNum.Text.Trim() != Session["SessionAppendNumber"].ToString())
{
oprtb.AlertMsg("輸入的驗(yàn)證碼錯(cuò)誤",Page);
return;
}
DataSet ds = new DataSet();
string sql = "select UserID,Name,DepartID,CompanyID,";
sql = sql+"(select Name from Depart where ((DepartID=UserList.DepartID) and ( CompanyID=UserList.CompanyID))) as DepartName,";
sql = sql+"(select Name from Company where (CompanyID=UserList.CompanyID)) as CompanyName ";
sql = sql+"from UserList where UserID='" + txtUserID.Text.Trim() +"' and Password='" + Encrypt.EncryptPwd(txtPassword.Text.Trim(),"MD5") + "' and Cancellation = 0";
//string sql = "select * from UserList where UserID='" + txtUserID.Text.Trim() +"' and Password='" + Encrypt.EncryptPwd(txtPassword.Text.Trim(),"MD5") + "' and Cancellation = 0";
ds = oprtb.SelectTable(sql);
if (ds.Tables[0].Rows.Count = 0)
{
oprtb.AlertMsg("輸入的用戶名或密碼錯(cuò)誤",Page);
return;
}
else
{
string UHAddress = Request.UserHostAddress;
string currentTime = DateTime.Now.ToString("yyyyMMdd hhmmss");
//登陸成功
Session["UserID"] = ds.Tables[0].Rows[0]["UserID"].ToString();
Session["Name"] = ds.Tables[0].Rows[0]["Name"].ToString();
Session["DepartID"] = ds.Tables[0].Rows[0]["DepartID"].ToString();
Session["DepartName"] = ds.Tables[0].Rows[0]["DepartName"].ToString();
Session["CompanyID"] = ds.Tables[0].Rows[0]["CompanyID"].ToString();
Session["CompanyName"] = ds.Tables[0].Rows[0]["CompanyName"].ToString();
//設(shè)置用戶的登陸時(shí)間
oprtb.SetStartTime(txtUserID.Text.Trim());
//設(shè)置用戶的登陸標(biāo)記
string s_mark = txtUserID.Text.Trim() + "_" + UHAddress + "_" + currentTime;
oprtb.SetLoginMark(s_mark,txtUserID.Text.Trim());
//保存登陸標(biāo)記
Session["LoginMark"] = s_mark;
MCompany.SystemLog slstru = new YesErp.MCompany.SystemLog();
slstru.SystemLog_IP = UHAddress;
slstru.SystemLog_LogIn = System.DateTime.Now;
slstru.SystemLog_Name = ds.Tables[0].Rows[0]["Name"].ToString();//用戶姓名
slstru.SystemLog_ID = Int32.Parse(ds.Tables[0].Rows[0]["UserID"].ToString());//用戶ID
//寫系統(tǒng)日志
oprtb.LoginSystemLog(slstru);
//oprtb.AlertMsg("登錄成功",Page);
Session["LoginTime"] = System.DateTime.Now;
//判斷并轉(zhuǎn)到新的頁面
oprtb.ChangeUrl("../index.aspx",Page);
}
}