J
John
This is a simple, newbe question.
In Asp/VB there are 2 ways to display message on page load
I can double click on aspx page and aspx.vb file is created:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Here I can crete my message
Response.Write("Page loaded")
End Sub
Alternatively, I can create script which will do same thing:
<script language="vb" runat="server">
Sub Page_Load(Sender As Object, E As EventArgs)
Response.Write("page loaded")
Edn Sub
</script>
Why there are 2 way to do same thing? Which one is correct/better? Are there any differences?
In Asp/VB there are 2 ways to display message on page load
I can double click on aspx page and aspx.vb file is created:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Here I can crete my message
Response.Write("Page loaded")
End Sub
Alternatively, I can create script which will do same thing:
<script language="vb" runat="server">
Sub Page_Load(Sender As Object, E As EventArgs)
Response.Write("page loaded")
Edn Sub
</script>
Why there are 2 way to do same thing? Which one is correct/better? Are there any differences?