0

Hello.
I wanted to make a website, but with a private section. The private section has to be accessed with a password. If I used a simple if statement to do so, will it be safe on the server side? Example:

Protected Sub AccessPrivate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles AccessPrivate.Click
        If InputBox("Enter password to unlock site:", "Password") = "password" Then
            MsgBox("Correct!")
        Else
            MsgBox("Incorrect!")
        End If
    End Sub

Would that be safe or would someone be able to view that source code?

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by JorgeM
0

No, you dont have to worry...asp.net is a server side scripting language. You can easily validate this by accesing the page via browser. Most browsers, if you right click from within the page, click on view source. You'll see that the code in the window is HTML.

The way it works when an asp.net page is called, the webserver processes your asp.net code, but will output HTML back to the browser. You see browsers are programmed to understand HTML, not asp.net, php, asp, java, etc...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.