📄 showvideo.aspx.cs
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace Vod
{
/// <summary>
/// ShowVideo 的摘要说明。
/// </summary>
public class ShowVideo : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Image lb_Image;
protected System.Web.UI.WebControls.Label lb_Description;
protected System.Web.UI.WebControls.Label lb_Com;
protected System.Web.UI.WebControls.Label lb_Class;
protected System.Web.UI.WebControls.Label lb_Hits;
protected System.Web.UI.WebControls.Label lb_Type;
protected System.Web.UI.WebControls.Label lb_Sizev;
protected System.Web.UI.WebControls.Label lb_Name;
protected System.Web.UI.WebControls.Label lb_title;
protected System.Web.UI.WebControls.ImageButton btndown;
My.Video myVideo=new My.Video();
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
ViewState["VideoId"]=Request.QueryString["VideoId"];
try
{
My.Video.Hits(ViewState["VideoId"].ToString());
initMessage();
}
catch
{}
}
private void initMessage()
{
DataRow myDr;
int classid;
DataView myDv;
myDr=myVideo.GetVideoDetail(int.Parse(ViewState["VideoId"].ToString()));
lb_Name.Text=myDr["name"].ToString();
lb_Image.ImageUrl=myDr["cover"].ToString ();
lb_Description.Text=myDr["descr"].ToString ();
lb_Sizev.Text=myDr["Sizev"].ToString();
classid = int.Parse(myDr["Class"].ToString());
myDv = My.VideoClass.GetClassName(classid);
lb_Class.Text= myDv[0]["className"].ToString();
lb_Type.Text=myDr["Type"].ToString();
lb_Com.Text=myDr["Dealtime"].ToString();
lb_Hits.Text=myDr["Hits"].ToString();
lb_title.Text="当前位置>>"+lb_Class.Text;
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.btndown.Click += new System.Web.UI.ImageClickEventHandler(this.btndown_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
private void btndown_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
int vid = int.Parse(ViewState["VideoId"].ToString());
Response.Redirect("play.aspx?videoid="+vid);
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -