淘宝新到货: http://shop36082390. 电脑及配件/杀毒U盘/移动硬盘/减肥产品/切苹果器/剥蒜器/个性烟灰缸/装饰彩灯/雨伞/女包//手机座/极品铁观间茶叶/五层布衣柜/三洋/日立投影机
QQ:410243392 (常用)
Sub updateinfo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles updateinfo.Click
Dim u As String = Session("username")
Dim filename, filepath As String
filename = Path.GetFileName(uploadfile.PostedFile.FileName)
filepath = Server.MapPath(".\images\dvimages\") & filename
uploadfile.PostedFile.SaveAs(filepath)
Dim uname As String = username.Text
Dim upwd As String = userpwd.Text
Dim uaddr As String = useraddr.Text
Dim usex As String = usersex.Text
Dim uborn As String = userborn.Text
Dim uqq As String = userqq.Text
Dim uemail As String = useremail.Text
Dim umsn As String = usermsn.Text
Dim uface As String = userface.ImageUrl
If uploadfile.Value.ToString() = "" Then
Dim strsql As String
strsql = "update users set username='" & uname & "',userpwd='" & upwd & "',useraddr='" & uaddr & "',usersex='" & usex & "',userborn='" & uborn & "',userqq='" & uqq & "',useremail='" & uemail & "',usermsn='" & umsn & "' where username='" & u & "'"
Dim cmd As New SqlCommand(strsql, conn)
conn.Open()
cmd.ExecuteNonQuery()
conn.Close()
message.Text = "更改成功!"
Else
Dim strsql As String
strsql = "update users set username='" & uname & "',userpwd='" & upwd & "',useraddr='" & uaddr & "',usersex='" & usex & "',userborn='" & uborn & "',userqq='" & uqq & "',useremail='" & uemail & "',usermsn='" & umsn & "',userface='.\images\dvimages\" & filename & "' where username='" & u & "'"
Dim cmd As New SqlCommand(strsql, conn)
conn.Open()
cmd.ExecuteNonQuery()
conn.Close()
message.Text = "更改成功!"
End If
End Sub