📄 events_cb.vb
字号:
Imports System
Imports System.Collections
Imports System.Web.UI
Imports System.Web.UI.WebControls
Public Class BaseClass
Inherits System.Web.UI.Page
'Each control used on events.aspx to be declared here with same id
Protected qty as textbox
Protected price as textbox
Protected amount as textbox
Sub Page_Load(Source As Object, E As EventArgs)
'this is the page load event
'gets fired each time the page is loaded
response.write("Page Load Event : -->fired <br>")
if NOT (isPostBack)
'the code here gets fired only one at page load
'subsequent reloads do not fire it due to the not isPostBack construct
response.write("The not isPostBack construct:--> ensures this does not get fired at reloads")
end if
End Sub
'This sub moved from the events.aspx form
Sub Calculate(src As Object,e As EventArgs)
Amount.Text = Cstr(cint(qty.text)*cint(price.text))
End sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -