Hello
In Classic ASP the <% %> are used to denote that the script is a server-side script, but in ASP.NET they are used to simply hide the script from the browser, is that right?
It's just that I have this code which, when processed, should insert data into my MDB when the user clicks the 'submit' button.
However, the code itself appears on the aspx page when I preview it in Internet Explorer:
Protected Sub CreateUser_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim conn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.ConnectionStrings("usersConnectionString").ConnectionString)
Dim sql As String = "INSERT INTO userlist (username,password, strEmail) VALUES (@username,@password, @strEmail)"
Dim cmd As OleDbCommand = New OleDbCommand(sql, conn)
conn.Open()
cmd.Parameters.AddWithValue("@username", txtusername.Text)
cmd. ...
Go to the complete details ...