PersonInfo/DownLoadFile.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Configuration;
namespace EasyExam.PersonalInfo
{
/// <summary>
/// DownLoadFile 的摘要说明。
/// </summary>
public partial class DownLoadFile : System.Web.UI.Page
{
string myLoginID="";
PublicFunction ObjFun=new PublicFunction();
int intUserScoreID=0,intRubricID=0;
#region//*********初始信息*******
protected void Page_Load(object sender, System.EventArgs e)
{
try
{
myLoginID=Session["LoginID"].ToString();
}
catch
{
}
if (myLoginID=="")
{
Response.Redirect("../Login.aspx");
}
intUserScoreID=Convert.ToInt32(Request["UserScoreID"]);
intRubricID=Convert.ToInt32(Request["RubricID"]);
if (!IsPostBack)
{
string strConn="";
strConn=ConfigurationSettings.AppSettings["strConn"];
SqlConnection ObjConn = new SqlConnection(strConn);
SqlCommand ObjCmd=new SqlCommand("select * from UserAnswer where UserScoreID="+intUserScoreID+" and RubricID="+intRubricID+"",ObjConn);
ObjConn.Open();
SqlDataReader ObjDR= ObjCmd.ExecuteReader(CommandBehavior.CloseConnection);
if (ObjDR.Read())
{
Response.ContentType="application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment;FileName="+ObjDR["TestFileName"].ToString());
Response.BinaryWrite((byte[])ObjDR["TestFile"]);
Response.End();
}
ObjConn.Dispose();
}
}
#endregion
后面还有 21 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
