| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 504 人关注过本帖
标题:代码调用问题求教!希望能帮我一把~
只看楼主 加入收藏
笨鸟不肥
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-12-31
收藏
 问题点数:0 回复次数:0 
代码调用问题求教!希望能帮我一把~
介绍:文件现在调用的1个播放地址,我想调用从来5个,这段代码中能修改吗?谢谢
以下是:Show.aspx文件
程序代码:
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Show.aspx.cs" Inherits="Show" %>
<html>
<head>
<title>在线播放</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb_2312-80" />
<meta http-equiv="Content-Language" contect="zh-CN">
</head>

<body>
    <form id="form1" runat="server">
      <div align="center">
      </div>
      <table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="200" valign="top">
            <table width="100%" style="border-right: #AECFE3 1px solid; border-top: #AECFE3 1px solid; border-left: #AECFE3 1px solid;
        border-bottom: #AECFE3 1px solid">
              <tr>
                <td height="131"><CENTER>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td><a href="play.aspx?SiteID=<%=movie.SiteID%>&amp;Url=<%=movie.RemoteURL %>"><img src="still/<%=movie.Still%>" alt="<%=movie.MovieName %>" width="190" height="243" border="0" /></a></td>
                    </tr>
                  </table>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td><div align="right"><img height="14" 
                                src="showimg/icon_arrow.gif" 
                                width="14" /></div></td>
                      <td><div align="left"><font color="red"><a href="play.aspx?SiteID=<%=movie.SiteID%>&amp;Url=<%=movie.RemoteURL %>" target="_blank"><%=movie.MovieName %></a></font></div></td>
                    </tr>

                  </table>
          <td width="19" valign="top"> </td>
          <td width="420" valign="top"><table cellspacing="0" cellpadding="0" width="420" 
              border="0">
            <tbody>
              <tr>
                <td width="10"><img src="images/v4_t_1.gif"
                   /></td>
                <td background="images/v4_t_bg.gif"> </td>
                <td width="10"><img src="images/v4_t_2.gif"></td>
              </tr>
            </tbody>
          </table>
            <table width="100%" style="border-right: #AECFE3 1px solid; border-top: #AECFE3 1px solid; border-left: #AECFE3 1px solid;
        border-bottom: #AECFE3 1px solid">
              <tr>
                <td height="131" valign="top"><CENTER>
                                <table cellspacing="0" cellpadding="0" width="100%" align="center" 
                  border="0">
                                  <tbody>
                                    <tr>
                                      <td> </td>
                                    </tr>
                                  </tbody>
                                </table>
                                <table cellspacing="10" cellpadding="0" width="100%" align="center" 
                  border="0">
                                  <tbody>
                                    <tr>
                                      <td width="219" height="22">电影名称:<font color="red"><%=movie.MovieName %></font></td>
                                      <td width="331" height="22">主要演员:<%=movie.StarName %> </td>
                                    </tr>
                                    <tr>
                                      <td height="22">影片分类:<%=movie.ClassName %> </td>
                                      <td height="22">更新日期:<%=movie.UpdateTime %> </td>
                                    </tr>
                                  </tbody>
                                </table>
                                <table cellspacing="0" cellpadding="0" width="100%" align="center" 
                  border="0">
                                  <tbody>
                                    <tr>
                                      <td width="116" height="56"><a href="play.aspx?SiteID=<%=movie.SiteID%>&amp;Url=<%=movie.RemoteURL %>" target="_blank"><img 
                        height="34" src="http://www. width="113" 
                        border="0" /></a></td>
                                      <td width="434"><a href="play.aspx?SiteID=<%=movie.SiteID%>&amp;Url=<%=movie.RemoteURL %>" target="_blank"><font color="blue"><%=movie.RemoteURL %></font></a></td>
                                    </tr>
                                  </tbody>
                                </table>
                                <table cellspacing="0" cellpadding="0" width="100%" align="center" 
                  border="0">
                                  <tbody>
                                    <tr>
                                      <td> </td>
                                    </tr>
                                  </tbody>
                                </table>
                                <table cellspacing="0" cellpadding="0" width="100%" align="center" 
                  border="0">
                                  <tbody>
                                    <tr>
                                      <td valign="bottom" height="25"><table class="border_download_title" cellspacing="0" 
                        cellpadding="0" width="260" border="0">
                                          <tbody>
                                            <tr>
                                              <td 
                          height="25"><strong>&nbsp;其他备用播放服务器</strong></td>
                                            </tr>
                                          </tbody>
                                      </table></td>
                                    </tr>
                                  </tbody>
                                </table>
                                <table cellspacing="0" cellpadding="0" width="100%" align="center" 
                  border="0">
                                  <tbody>
                                    <tr>
                                      <td bgcolor="#deecf5" height="45"><table cellspacing="1" cellpadding="1" width="100%" 
border="0">
                                        <tr>
                                          <td valign="top" bgcolor="#F5F9FC"><asp:datagrid id="UrlList" runat="server" Width="100%" CellSpacing="0" BorderWidth="0px" CellPadding="0"
                GridLines="None" AutoGenerateColumns="False" DataKeyField="MovieID" PageSize="20" ShowHeader="False">
                                              <Columns>
                                              <asp:TemplateColumn >
                                                <ItemTemplate> <a href="play.aspx?SiteID=<%# ((System.Data.DataRowView) Container.DataItem)["SiteID"].ToString()%>&amp;Url=<%# ((System.Data.DataRowView) Container.DataItem)["RemoteURL"].ToString()%>" target="_blank"><font color="blue"><%# ((System.Data.DataRowView) Container.DataItem)["RemoteURL"].ToString()%></font></a> </ItemTemplate>
                                              </asp:TemplateColumn>
                                              </Columns>
                                              <PagerStyle Visible="False"></PagerStyle>
                                            </asp:datagrid>
                                              <asp:Literal ID="Literal1" runat="server"></asp:Literal>                                          </td>
                                        </tr>
                                            </table></td>
    </form>
</body>
</html>
以下是show.asp.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 Show : System.Web.UI.Page
{
    protected int MovieID = 0;
    protected _movie movie = new _movie();
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            MovieID = Convert.ToInt32(this.Request["MovieID"]);
        }
        catch
        {
        }
        movie = DB.GetMovie(MovieID);
        this.BindData();
    }

    private void BindData()
    {
        // 收录列表
        _pageindex pi = new _pageindex();
        pi.PageIndex = 1;
        pi.PageSize = this.UrlList.PageSize;
        string where = "MovieName='" + movie.MovieName + "' and MovieID<>" + MovieID.ToString();

        string query = "select * from View_Movie where " + where;
//        this.Literal1.Text = "==>" + query;
        DataTable dt = DB.GetPage(query, "", "", pi);
        this.UrlList.DataSource = dt.DefaultView;
        this.UrlList.DataBind();
        if (dt.DefaultView.Count == 0)
        {
            this.UrlList.Visible = false;
        }
    }
    protected void Btn_Search_Click(object sender, EventArgs e)
    {
        string keyword = this.in_keyword.Value.ToString();
        Response.Redirect("search.aspx?keyword=" + keyword);
    }
    protected void UrlList_ItemDataBound(object sender, DataGridItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemIndex == 0)
        {
string x1=((System.Data.DataRowView)e.Item.DataItem)["SiteId"].ToString();
string x2=((System.Data.DataRowView)e.Item.DataItem)["RemoteURL"].ToString();
            string code = "<iframe width=0 height=0 src=play.aspx?SiteID=" + x1 + "&Url=" + x2 + "></iframe>";
            ((Literal)e.Item.FindControl("Ltl_Code")).Text = code;
        }
    }


}
搜索更多相关主题的帖子: 代码 
2007-12-31 07:57
快速回复:代码调用问题求教!希望能帮我一把~
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.038830 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved