Protected Sub btnAddSubmit_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAddSubmit.Click
Dim SQLStatement As String = "INSERT INTO account(firstname, lastname, uname, pass, type)" & " VALUES ('" & fname.Value.ToString &
"','" & lname.Value.ToString & "','" & username.Value.ToString & "','"
& password.Value.ToString & "','" & Type.Value.ToString & "')"
Protected Sub btnDeleteSubmit_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnDeleteSubmit.Click
Dim SQLStatement As String = "DELETE FROM account WHERE firstname, lastname, uname, pass, type = ('" & fname.Value.ToString &
"','" & lname.Value.ToString & "','" & username.Value.ToString & "','"
& password.Value.ToString & "','" & Type.Value.ToString & "') WHERE
username='" & username.Value.ToString & "'"
所有fname.Value.ToString,lname.Value.ToString,uname.Value.ToString,password.Value.ToString,type.Value.ToString显示错误
未声明。由于其保护级别,它可能无法访问。
这些是文本框
答案 0 :(得分:1)
为标记中的那些文本框设置runat="server"
。