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

📄 managescore.aspx.vb

📁 利用简单框架结构vb+asp+sql,实现小型考试系统
💻 VB
字号:
Imports System.Data
Imports System.Data.SqlClient
Imports Exam.Module1
Public Class managescore
    Inherits System.Web.UI.Page

#Region " Web 窗体设计器生成的代码 "

    '该调用是 Web 窗体设计器所必需的。
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    Protected WithEvents rep As System.Web.UI.WebControls.Repeater

    '注意: 以下占位符声明是 Web 窗体设计器所必需的。
    '不要删除或移动它。
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: 此方法调用是 Web 窗体设计器所必需的
        '不要使用代码编辑器修改它。
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        '在此处放置初始化页的用户代码
        If Request("id") <> Nothing Then
            Dim Scoreid As Integer = CInt(Request("id"))
            strsql = "Delete from score where id=" & Scoreid
            ExeSQL(strsql)
        End If
        If Session("AdminName") Is Nothing Then
            Response.Write("<script language='javascript'>alert('用户不存在或者权限不足,请确认已登录.');history.go(-1);</script>")
        Else
            DataBingToRep()
        End If
    End Sub
    '
    '显示学生的已考课程
    Sub DataBingToRep()
        strsql = "select * from score"
        Dim cmd As New SqlDataAdapter(strsql, appconn)
        Dim ds As New DataSet
        cmd.Fill(ds, "sort")
        rep.DataSource = ds.Tables("sort").DefaultView
        rep.DataBind()
    End Sub
End Class

⌨️ 快捷键说明

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