generalex.aspx.cs.svn-base

来自「大学英语学习系统」· SVN-BASE 代码 · 共 44 行

SVN-BASE
44
字号
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Student_GeneralEx_GeneralEx : System.Web.UI.Page
{
    string Sname="";
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["USERSTYLE"] == "STUDENT")
        {
             Sname = Session["USERNAME"].ToString();
        }
        else
        {
            Dialog("对不起,你没有权限访问这个页面!");
            Response.Redirect("~/SystemManage/Login.aspx");
        }
    }
    private void Dialog(String Str)
    {
        Response.Write(@"<script type='text/JavaScript'>");
        Response.Write(@"alert('" + Str + "');");
        //Response.Write(@"window.location='./list_logingroup.aspx';");
        Response.Write(@"</script>");
    }
    protected void BtnGeneralEx_Click(object sender, EventArgs e)
    {
        String strHard = GeneralText.Text;
        if(GeneralText.Text.Equals(""))
            return;
        String sParam = "?strHard=" + strHard;
        sParam += "&Sname=" + Sname;
        Response.Redirect("~/Student/GeneralEx/Exercise.aspx" + sParam);
    }
}

⌨️ 快捷键说明

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