⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defaultvb.aspx.vb

📁 Telerik是很大的第三方软件制造商
💻 VB
字号:

Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.Data
Imports System.Data.OleDb
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.GenericCallback
    '/ <summary>
    '/ Summary description for _Default.
    '/ </summary>

    Public Class DefaultVB
        Inherits XhtmlPage
        Protected lblDescription As System.Web.UI.WebControls.Label
        Protected Panel1 As System.Web.UI.WebControls.Panel
        Protected WithEvents Img1 As System.Web.UI.HtmlControls.HtmlImage
        Protected WithEvents callback1 As Telerik.WebControls.RadCallback


        Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
        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 Function GetDescription(ByVal name As String) As String
            Dim path As String = Server.MapPath("~/Callback/data/descriptions.mdb")
            Dim dbCon As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path)
            dbCon.Open()
            Dim descr As String = String.Empty
            Try
                Dim command As New OleDbCommand("SELECT description FROM descriptions WHERE name=""" + name + """", dbCon)
                descr = CStr(command.ExecuteScalar())
            Finally
                dbCon.Close()
            End Try
            Return descr
        End Function 'GetDescription


        Private Sub RadCallback1_Callback(ByVal sender As Object, ByVal args As Telerik.WebControls.CallbackEventArgs) Handles callback1.Callback
            Dim description As String = GetDescription(args.CallbackEvent)
            lblDescription.Text = description
        End Sub 'RadCallback1_Callback
    End Class 'DefaultVB 
End Namespace 'Telerik.CallbackExamplesVB.Controls.GenericCallback 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -