📄 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.Controls.Image
'/ <summary>
'/ Summary description for _Default.
'/ </summary>
Public Class DefaultVB
Inherits XhtmlPage
Protected WithEvents image1 As Telerik.WebControls.CallbackImage
Protected WithEvents image2 As Telerik.WebControls.CallbackImage
Protected WithEvents image3 As Telerik.WebControls.CallbackImage
Protected Label2 As System.Web.UI.WebControls.Label
Protected selectedImage As Telerik.WebControls.CallbackImage
Protected ListBox1 As Telerik.WebControls.CallbackListBox
Protected WithEvents label11 As System.Web.UI.WebControls.Label
Protected WithEvents statusLabel As System.Web.UI.WebControls.Label
Protected WithEvents LoadingPanel1 As Telerik.WebControls.LoadingPanel
Protected WithEvents Img1 As System.Web.UI.HtmlControls.HtmlImage
Protected Label1 As System.Web.UI.WebControls.Label
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub 'Page_Load
' Put user code to initialize the page here
#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 image1_MouseOver(ByVal sender As Object, ByVal args As Telerik.WebControls.CallbackControls.MouseEventArgs) Handles image1.MouseOver
image1.ResponseScript = String.Format("document.getElementById('{0}').style.borderWidth = 2;", image1.ClientID)
image1.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'red';", image1.ClientID)
image1.ResponseScript += String.Format("document.getElementById('{0}').style.borderWidth = 2;", image2.ClientID)
image1.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'white';", image2.ClientID)
image1.ResponseScript += String.Format("document.getElementById('{0}').style.borderWidth = 2;", image3.ClientID)
image1.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'white';", image3.ClientID)
selectedImage.ImageUrl = "radChartScreenshot.jpg"
End Sub 'image1_MouseOver
Private Sub image2_MouseOver(ByVal sender As Object, ByVal args As Telerik.WebControls.CallbackControls.MouseEventArgs) Handles image2.MouseOver
image2.ResponseScript = String.Format("document.getElementById('{0}').style.borderWidth = 2;", image2.ClientID)
image2.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'red';", image2.ClientID)
image2.ResponseScript += String.Format("document.getElementById('{0}').style.borderWidth = 2;", image1.ClientID)
image2.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'white';", image1.ClientID)
image2.ResponseScript += String.Format("document.getElementById('{0}').style.borderWidth = 2;", image3.ClientID)
image2.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'white';", image3.ClientID)
selectedImage.ImageUrl = "radEditorScreenshot.jpg"
End Sub 'image2_MouseOver
Private Sub image3_MouseOver(ByVal sender As Object, ByVal args As Telerik.WebControls.CallbackControls.MouseEventArgs) Handles image3.MouseOver
image3.ResponseScript = String.Format("document.getElementById('{0}').style.borderWidth = 2;", image3.ClientID)
image3.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'red';", image3.ClientID)
image3.ResponseScript += String.Format("document.getElementById('{0}').style.borderWidth = 2;", image1.ClientID)
image3.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'white';", image1.ClientID)
image3.ResponseScript += String.Format("document.getElementById('{0}').style.borderWidth = 2;", image2.ClientID)
image3.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'white';", image2.ClientID)
selectedImage.ImageUrl = "radTreeviewScreenshot.jpg"
End Sub 'image3_MouseOver
Private Sub image1_MouseClick(ByVal sender As Object, ByVal args As Telerik.WebControls.CallbackControls.MouseEventArgs) Handles image1.MouseClick
Dim item As ListItem = ListBox1.Items.FindByText("Chart")
If item Is Nothing Then
ListBox1.Items.Add("Chart")
Else
image1.ResponseScript = "alert('The product is already added to the cart.');"
End If
End Sub 'image1_MouseDblClick
Private Sub image2_MouseClick(ByVal sender As Object, ByVal args As Telerik.WebControls.CallbackControls.MouseEventArgs) Handles image2.MouseClick
Dim item As ListItem = ListBox1.Items.FindByText("Editor")
If item Is Nothing Then
ListBox1.Items.Add("Editor")
Else
image1.ResponseScript = "alert('The product is already added to the cart.');"
End If
End Sub 'image2_MouseDblClick
Private Sub image3_MouseClick(ByVal sender As Object, ByVal args As Telerik.WebControls.CallbackControls.MouseEventArgs) Handles image3.MouseClick
Dim item As ListItem = ListBox1.Items.FindByText("TreeView")
If item Is Nothing Then
ListBox1.Items.Add("TreeView")
Else
image1.ResponseScript = "alert('The product is already added to the cart.');"
End If
End Sub 'image3_MouseDblClick
Private Sub image1_GetFocus(ByVal sender As Object, ByVal e As System.EventArgs)
image1.ResponseScript = String.Format("document.getElementById('{0}').style.borderWidth = 2;", image1.ClientID)
image1.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'red';", image1.ClientID)
image1.ResponseScript += String.Format("document.getElementById('{0}').style.borderWidth = 2;", image2.ClientID)
image1.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'white';", image2.ClientID)
image1.ResponseScript += String.Format("document.getElementById('{0}').style.borderWidth = 2;", image3.ClientID)
image1.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'white';", image3.ClientID)
End Sub 'image1_GetFocus
Private Sub image2_GetFocus(ByVal sender As Object, ByVal e As System.EventArgs)
image2.ResponseScript = String.Format("document.getElementById('{0}').style.borderWidth = 2;", image2.ClientID)
image2.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'red';", image2.ClientID)
image2.ResponseScript += String.Format("document.getElementById('{0}').style.borderWidth = 2;", image1.ClientID)
image2.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'white';", image1.ClientID)
image2.ResponseScript += String.Format("document.getElementById('{0}').style.borderWidth = 2;", image3.ClientID)
image2.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'white';", image3.ClientID)
End Sub 'image2_GetFocus
Private Sub image3_GetFocus(ByVal sender As Object, ByVal e As System.EventArgs)
image3.ResponseScript = String.Format("document.getElementById('{0}').style.borderWidth = 2;", image3.ClientID)
image3.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'red';", image3.ClientID)
image3.ResponseScript += String.Format("document.getElementById('{0}').style.borderWidth = 2;", image1.ClientID)
image3.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'white';", image1.ClientID)
image3.ResponseScript += String.Format("document.getElementById('{0}').style.borderWidth = 2;", image2.ClientID)
image3.ResponseScript += String.Format("document.getElementById('{0}').style.borderColor = 'white';", image2.ClientID)
End Sub 'image3_GetFocus
End Class 'DefaultVB
End Namespace 'Telerik.CallbackExamplesVB.Controls.Image
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -