资源简介
asp net在线音乐网站 主要实现了在线音乐的管理 实现了网上听音乐的基本功能
代码片段和文件信息
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 _Default : System.Web.UI.Page
{
public string sqlncontent;
public string npicsnlinksntexts;
protected void Page_Load(object sender EventArgs e)
{
if (!IsPostBack)
{
sql = “select top 5 idtitleshouyetupian from allgonggao where shouyetupian<>‘‘ order by id desc“;
getsyt(sql);
sql = “select top 6 idtitleaddtimeleibie from allgonggao where leibie=‘音乐新闻‘ order by id desc“;
getdata(sql);
//sql = “select top 5 * from yonghuzhuce where touxiang<>‘‘ order by id desc“;
//getdata2(sql);
//sql = “select top 5 * from allgonggao where leibie=‘签证告知‘ order by id desc“;
//getdata2(sql);
//sql = “select top 5 * from kaoshizhidao order by id desc“;
//getdata3(sql);
//sql = “select top 5 * from shangpinxinxi where tupian<>‘‘ order by id desc“;
//getdata4(sql);
sql = “select content from dx where leibie=‘系统简介‘“;
getdatextjj(sql);
sql = “select top 5 * from gequxinxi order by id desc“;
getdata2(sql);
}
}
private void getdatextjj(string sql)
{
DataSet result = new DataSet();
result = new Class1().hsggetdata(sql);
if (result != null)
{
if (result.Tables[0].Rows.Count > 0)
{
ncontent = result.Tables[0].Rows[0][0].ToString().Trim();
}
}
}
private void getdata(string sql)
{
DataSet result = new DataSet();
result = new Class1().hsggetdata(sql);
if (result != null)
{
if (result.Tables[0].Rows.Count > 0)
{
DataGrid1.DataSource = result.Tables[0];
DataGrid1.DataBind();
}
else
{
DataGrid1.DataSource = null;
DataGrid1.DataBind();
}
}
}
private void getdata2(string sql)
{
DataSet result = new DataSet();
result = new Class1().hsggetdata(sql);
if (result != null)
{
if (result.Tables[0].Rows.Count > 0)
{
DataGrid2.DataSource = result.Tables[0];
DataGrid2.DataBind();
}
else
{
DataGrid2.DataSource = null;
DataGrid2.DataBind();
}
}
}
private void getsyt(string sql)
{
DataSet result = new DataSet();
result = new Class1().hsggetdata(sql);
if (result != null)
{
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3837728 2012-04-08 02:59 net网上酷我音乐台xns录像.exe
----------- --------- ---------- ----- ----
3837728 1
- 上一篇:Asp.net 后台框架源码
- 下一篇:数字图书管理系统
评论
共有 条评论