怎样在asp.net 2.0的页面中播放视频文件?

最近,在网上下载了一个 电影在线系统网站来学习,但下载下来调试时,总播放不了视频?那位高手可帮手看下,代码如下:

play.aspx

<% @ Page Language = " C# "  AutoEventWireup = " true "  CodeFile = " play.aspx.cs "  Inherits = " play "   %>


<! DOCTYPE html PUBLIC  " -//W3C//DTD XHTML 1.0 Transitional//EN "   " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd " >

< html xmlns = " http://www.w3.org/1999/xhtml "   >
< head runat = " server " >
    
< title > Play </ title >
</ head >
< body >
    
< form id = " form1 "  runat = " server " >
    
< div style = " background-image:url(/MovieShow/Images/playbd.jpg);z-index: 100; left: 0px; position: absolute;top: 0px; width:700px; height:525px " >
    
< div style = " position:absolute; left: 28px; width: 76px; top: 52px; height: 1px; z-index: 100; " >
              
< div >
              
< table width = " 100% "  border = " 0 " >< tr >
                
< td style = " height: 24px; width: 4%; " >
                  
< input type = " button "  onclick = " if (document.player.GetPlayState()==3) document.player.SetFullScreen() "  value = " 全屏播放 "  style = " font: 11px; background: #F0F8FF; border: 1px solid #666; " >
                
</ td >
              
</ table >
              
</ div >
     
</ div >
        
< div style = " position:absolute; left: 25px; top: 132px; width: 468px; height: 324px; z-index: 101; " >
         
< object  classid = clsid:CFCDAA03 - 8BE4 - 11cf - B84B - 0020AFBBCCFA name = " player "  style = " width: 652px; height: 308px; " >
                        
< param name = CONTROLS value = ImageWindow >
                        
< param name = CONSOLE value = Video >
                        
< param name = CENTER value = " 0 " >
                        
< param name = " AUTOSTART "  value = " 0 " >
                        
< param name = " SHUFFLE "  value = " 0 " >
                        
< param name = " PREFETCH "  value = " 0 " >
                        
< param name = " NOLABELS "  value = " 0 " >
                        
< param name = " LOOP "  value = " 0 " >
                        
< param name = " NUMLOOP "  value = " 0 " >
                        
< param name = " MAINTAINASPECT "  value = " 0 " >
                        
< param name = " BACKGROUNDCOLOR "  value = " #000000 " >
        
</ object >
        
< object  classid = clsid:CFCDAA03 - 8BE4 - 11cf - B84B - 0020AFBBCCFA name = " status "  style = " width: 652px; height: 56px " >  
                        
< param name = CONTROLS value = ControlPanel,StatusBar  >  
                        
< param name = CONSOLE value = Video >
                        
< param name = SRC value = "  <% =geturl()%>  " >
                        
< param name = AUTOSTART value = " -1 " >
                        
< param name = PREFETCH value = " 0 " >
                        
< param name = LOOP value = " 0 " >
                        
< param name = NUMLOOP value = " 0 " >
                        
                        
< param name = " MAINTAINASPECT "  value = " 0 " >
                        
< param name = " BACKGROUNDCOLOR "  value = " #000000 " >
       
</ object >
        
 
        
</ div >
        
< input id = " Hidden1 "  runat = " server "  style = " z-index: 102; left: 720px; width: 52px; position: absolute;
            top: 8px "  type= " hidden "  />
    
    
</ div >
    
</ form >
</ body >
</ html >

play.aspx.cs

 

 

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  play : System.Web.UI.Page
{
    
//该源码下载自www.51aspx.com(51aspx.com)

    
protected void Page_Load(object sender, EventArgs e)     //不是很明白下面代码的意思,希高手指点一下
    {
        
int filmid = Convert.ToInt32(Request.QueryString["FilmID"].ToString());
        DataVisit mydv 
= new DataVisit();        // 特别是这句
        Session["url"]= mydv.getURL(filmid);
       
        
       
    }


    
public string geturl()
    
{
        
return ("/"+Session["url"].ToString());
    }
 
   
    
       
    
}



 数据库中的数据如下:

在网页中点击播放时弹出的对话框如下:

请问是什么原因啊!
      

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值