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

📄 defaultvb.aspx.vb

📁 Telerik是很大的第三方软件制造商
💻 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.WebControls
Imports Telerik.QuickStart


Namespace Telerik.CallbackExamplesVB.Controls.RadioButton


'/ <summary>
'/ Summary description for DefaultCS.
'/ </summary>

Public Class DefaultVB
        Inherits XhtmlPage
        Protected Label1 As System.Web.UI.WebControls.Label
        Protected tbFirstName As System.Web.UI.WebControls.TextBox
        Protected Label2 As System.Web.UI.WebControls.Label
        Protected tbLastName As System.Web.UI.WebControls.TextBox
        Protected WithEvents CallbackRadioButton1 As Telerik.WebControls.CallbackRadioButton
        Protected Label3 As System.Web.UI.WebControls.Label
        Protected tbGradDate As System.Web.UI.WebControls.TextBox
        Protected Label4 As System.Web.UI.WebControls.Label
        Protected tbFieldOfStudy As System.Web.UI.WebControls.TextBox
        Protected WithEvents CallbackRadioButton2 As Telerik.WebControls.CallbackRadioButton
        Protected Label6 As System.Web.UI.WebControls.Label
        Protected tbSubjects As System.Web.UI.WebControls.TextBox
        Protected Label7 As System.Web.UI.WebControls.Label
        Protected tbExperience As System.Web.UI.WebControls.TextBox
        Protected Label8 As System.Web.UI.WebControls.Label
        Protected tbSchoolName As System.Web.UI.WebControls.TextBox
        Protected WithEvents CallbackButton1 As Telerik.WebControls.CallbackButton
        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 lbStatus As System.Web.UI.WebControls.Label



    Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

    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 SetFields()
            If CallbackRadioButton1.Checked Then
                tbGradDate.Enabled = True
                tbFieldOfStudy.Enabled = True
                tbSubjects.Enabled = False
                tbExperience.Enabled = False

                tbGradDate.BackColor = Color.FromName("#ffffe1")
                tbFieldOfStudy.BackColor = Color.FromName("#ffffe1")
                tbSubjects.BackColor = Color.FromName("#f2f2f2")
                tbExperience.BackColor = Color.FromName("#f2f2f2")
            Else
                tbGradDate.Enabled = False
                tbFieldOfStudy.Enabled = False
                tbSubjects.Enabled = True
                tbExperience.Enabled = True

                tbGradDate.BackColor = Color.FromName("#f2f2f2")
                tbFieldOfStudy.BackColor = Color.FromName("#f2f2f2")
                tbSubjects.BackColor = Color.FromName("#ffffe1")
                tbExperience.BackColor = Color.FromName("#ffffe1")
            End If

        End Sub 'SetFields

        Protected Sub CallbackRadioButton1_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles CallbackRadioButton1.CheckedChanged, CallbackRadioButton2.CheckedChanged

            SetFields()

        End Sub 'CallbackRadioButton1_CheckedChanged

        Protected Sub CallbackButton1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CallbackButton1.Click
            Dim gradeName As String = IIf(CallbackRadioButton1.Checked, "student", "teacher")
            lbStatus.Text = tbFirstName.Text + " " + tbLastName.Text + " is successfully registered as a " + gradeName + "."
        End Sub 'CallbackButton1_Click
    End Class 'DefaultCS

End Namespace

⌨️ 快捷键说明

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