?? 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;
using System.Data.SqlClient;
namespace gllbysj
{
/// <summary>
/// ShowVideo 的摘要說明。
/// </summary>
public class ShowVideo : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label Label6;
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.Label Label3;
protected System.Web.UI.WebControls.Label Label4;
protected System.Web.UI.WebControls.Label Label5;
protected System.Web.UI.WebControls.Label Label7;
protected System.Web.UI.WebControls.LinkButton LinkButton1;
protected System.Web.UI.WebControls.HyperLink HyperLink1;
protected System.Web.UI.WebControls.Label Label8;
protected System.Web.UI.WebControls.HyperLink HyperLink2;
protected System.Web.UI.WebControls.Image Image1;
private void Page_Load(object sender, System.EventArgs e)
{
// 在此處放置用戶代碼以初始化頁面
this.con();
}
public void con()
{
string id=Request.QueryString["moveid"].ToString();
SqlConnection con=db.createcon();
con.Open ();
SqlCommand cmm=new SqlCommand("select * from mess where id='"+id+"'",con);
SqlDataReader dr=cmm.ExecuteReader();
if(dr.Read())
{
this.Label6.Text=dr["name"].ToString();
this.Label1.Text=dr["class1"].ToString();
this.Label2.Text=dr["sizev"].ToString();
this.Label3.Text=dr["times"].ToString();
this.Label4.Text=dr["hits"].ToString();
string str=dr["descr"].ToString();
str=str.Substring(0)+"......";
this.Label5.Text="  "+str;
this.Label7.Text=dr["主要演員"].ToString();
this.Image1.ImageUrl="upimage/"+dr["image"].ToString();
this.Label8.Text="["+dr["talk"].ToString()+"]";
//string str2=dr["filename"].ToString();
//string id1=dr["id"].ToString();
Session["playid"]=dr["id"].ToString();
Session["hit"]=dr["hits"].ToString();
Session["vname"]=dr["name"].ToString();
Session["vid"]=dr["id"].ToString();
}
con.Close();
}
#region Web 窗體設計器生成的代碼
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 該調用是 ASP.NET Web 窗體設計器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 設計器支持所需的方法 - 不要使用代碼編輯器修改
/// 此方法的內容。
/// </summary>
private void InitializeComponent()
{
this.LinkButton1.Click += new System.EventHandler(this.LinkButton1_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void LinkButton1_Click(object sender, System.EventArgs e)
{
SqlConnection conn=db.createcon();
conn.Open();
int a=Convert.ToInt32(Convert.ToString(Session["hit"].ToString()));
a++;
int s=Convert.ToInt32(Convert.ToString(Session["playid"].ToString()));
//int ss=Convert.ToInt32(s);
SqlCommand cmm=new SqlCommand("update mess set hits='"+a+"' where id='"+s+"'",conn);
cmm.ExecuteNonQuery();
conn.Close();
Response.Redirect("play.aspx");
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -