📄 defaultvb.aspx.vb
字号:
Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Web
Imports System.Web.SessionState
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Imports Telerik.QuickStart
Imports Telerik.WebControls
Namespace Telerik.CallbackExamplesVB.Functionality.Settings
'/ <summary>
'/ Summary description for _Default.
'/ </summary>
Public Class DefaultVB
Inherits XhtmlPage
Protected WithEvents CallbackButton1 As Telerik.WebControls.CallbackButton
Protected WithEvents CallbackButton2 As Telerik.WebControls.CallbackButton
Protected WithEvents cbAllowOtherCallbacks1 As Telerik.WebControls.CallbackCheckBox
Protected WithEvents cbDisableAtCallback1 As Telerik.WebControls.CallbackCheckBox
Protected WithEvents cbAllowOtherCallbacks2 As Telerik.WebControls.CallbackCheckBox
Protected WithEvents cbDisableAtCallback2 As Telerik.WebControls.CallbackCheckBox
Protected StatusLabel2 As System.Web.UI.WebControls.Label
Protected StatusLabel1 As System.Web.UI.WebControls.Label
Protected txtBoxSleepTime1 As System.Web.UI.WebControls.TextBox
Protected Label1 As System.Web.UI.WebControls.Label
Protected Label2 As System.Web.UI.WebControls.Label
Protected lblStatus As System.Web.UI.WebControls.Label
Protected Label3 As System.Web.UI.WebControls.Label
Protected WithEvents LoadingPanel1 As Telerik.WebControls.LoadingPanel
Protected WithEvents Img1 As System.Web.UI.HtmlControls.HtmlImage
Protected StatusLabel As System.Web.UI.WebControls.Label
Private Sub SetControls()
cbAllowOtherCallbacks1.Checked = CallbackButton1.AllowOtherCallbacks
cbDisableAtCallback1.Checked = CallbackButton1.DisableAtCallback
cbAllowOtherCallbacks2.Checked = CallbackButton2.AllowOtherCallbacks
cbDisableAtCallback2.Checked = CallbackButton2.DisableAtCallback
txtBoxSleepTime1.Text = "2000"
End Sub 'SetControls
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
SetControls()
End If
End Sub 'Page_Load
#Region "Web Form Designer generated code"
Protected Overrides Sub OnInit(ByVal e As EventArgs)
'
' CODEGEN: This call is required by the ASP.NET Web Form Designer.
'
InitializeComponent()
MyBase.OnInit(e)
End Sub 'OnInit
'/ <summary>
'/ Required method for Designer support - do not modify
'/ the contents of this method with the code editor.
'/ </summary>
Private Sub InitializeComponent()
End Sub 'InitializeComponent
#End Region
Private Sub UpdateStatusLabel1()
CallbackButton1.DisableAtCallback = cbDisableAtCallback1.Checked
CallbackButton1.AllowOtherCallbacks = cbAllowOtherCallbacks1.Checked
End Sub 'UpdateStatusLabel1
Private Sub UpdateStatusLabel2()
CallbackButton2.DisableAtCallback = cbDisableAtCallback2.Checked
CallbackButton2.AllowOtherCallbacks = cbAllowOtherCallbacks2.Checked
End Sub 'UpdateStatusLabel2
Private Sub CallbackCheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbAllowOtherCallbacks1.CheckedChanged
UpdateStatusLabel1()
End Sub 'CallbackCheckBox1_CheckedChanged
Private Sub cbDisableAtCallback_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbDisableAtCallback1.CheckedChanged
UpdateStatusLabel1()
End Sub 'cbDisableAtCallback_CheckedChanged
Private Sub cbAllowOtherCallbacks2_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbAllowOtherCallbacks2.CheckedChanged
UpdateStatusLabel2()
End Sub 'cbAllowOtherCallbacks2_CheckedChanged
Private Sub cbDisableAtCallback2_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbDisableAtCallback2.CheckedChanged
UpdateStatusLabel2()
End Sub 'cbDisableAtCallback2_CheckedChanged
Private Sub CallbackButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CallbackButton1.Click
Try
System.Threading.Thread.Sleep(Integer.Parse(txtBoxSleepTime1.Text))
Catch
System.Threading.Thread.Sleep(2000)
txtBoxSleepTime1.Text = "2000"
End Try
StatusLabel1.Text = "Result is " + New Random().Next(0, 100).ToString()
End Sub 'CallbackButton1_Click
Private Sub CallbackButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CallbackButton2.Click
StatusLabel2.Text = "Result is " + New Random().Next(0, 100).ToString()
End Sub 'CallbackButton2_Click
End Class 'DefaultVB
End Namespace 'Telerik.CallbackExamplesVB.Functionality.Settings
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -