资源简介
这是一个C#语言编写的网站程序,具有多种功能,希望能帮到你学习C#语言
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class detail : System.Web.UI.Page
{
protected void Page_Load(object sender EventArgs e)
{
if (Session[“username“] != null)
{
if (Session[“username“].ToString() != ““)
{
Label3.Text = Session[“username“].ToString();
}
else
{
Label3.Text = “游客“;
}
}
else
{
Label3.Text = “游客“;
}
DBClass db = new DBClass();
string subjects;
int intwordID = 0;
if (!Page.IsPostBack)
{
if ( Request.QueryString[“id“] == null)
{
Response.Redirect(“homepage.aspx“);
}
else
{
intwordID = int.Parse(Request .QueryString [“id“].ToString ());
Session[“leaveID“] = intwordID;
string strcmd = “select leavetitle from leavemessages where ID=“+ intwordID +““;
subjects = db.FirstrowFirstcolumn(strcmd );
Session[“subjects“] = subjects;
dvBind(intwordID);
}
}
}
//为detailsview绑定数据
protected void dvBind(int intwordID)
{
DBClass db = new DBClass();
string strCmd = “select * from leavemessages where ID=“ + intwordID + ““;
DataTable dt = new DataTable();
dt = db.getdatatable(strCmd );
dvwords.DataSource = dt;
dvwords.DataBind();
}
protected void dvwords_PageIndexChanging(object sender DetailsViewPageEventArgs e)
{
}
protected void linkButton1_Click(object sender EventArgs e)
{
Server.Transfer(“viewrp.aspx“);
}
protected void linkButton2_Click1(object sender EventArgs e)
{
Server.Transfer(“replay.aspx“);
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1581 2011-06-19 12:32 MesGe\App_Code\DBClass.cs
文件 247 2011-06-03 23:55 MesGe\App_Themes\leaveword\leaveword.css
文件 586 2011-06-16 22:13 MesGe\App_Themes\login\loginss.css
文件 55 2011-06-16 11:31 MesGe\App_Themes\login\st
文件 1134 2011-06-03 23:45 MesGe\App_Themes\master\Mster.css
文件 733 2011-06-07 21:50 MesGe\App_Themes\regist\regist.css
文件 98 2011-06-13 15:40 MesGe\App_Themes\st
文件 124 2011-06-19 21:05 MesGe\App_Themes\usercenter\usercenter.css
文件 96 2011-06-20 20:39 MesGe\App_Themes\usermessage\messsage.css
文件 753664 2008-10-30 11:39 MesGe\aspnet_client\FreeTextBox\FreeTextBox.dll
文件 46273 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\FTB-FreeTextBox.js
文件 9364 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\FTB-ImageGallery.js
文件 92844 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\FTB-Pro.js
文件 3371 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\FTB-ToolbarItems.js
文件 7554 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\FTB-Utility.js
文件 865 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\images\bold.gif
文件 138 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\images\bulletedlist.gif
文件 7128 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\images\buttons.gif
文件 8340 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\images\buttons.png
文件 373 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\images\copy.gif
文件 429 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\images\createli
文件 140 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\images\csharp.gif
文件 342 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\images\cut.gif
文件 234 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\images\delete.gif
文件 331 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\images\deletetablecolumn.gif
文件 344 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\images\deletetablerow.gif
文件 599 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\images\editst
文件 632 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\images\edittable.gif
文件 634 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\images\edittablecell.gif
文件 977 2008-01-08 10:31 MesGe\aspnet_client\FreeTextBox\images\edittablerow.gif
............此处省略653个文件信息
- 上一篇:C#的电影院售票系统
- 下一篇:RibbonControl控件功能区控件
评论
共有 条评论