• 大小: 45.28MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-10
  • 语言: C#
  • 标签: C#  项目  开发  

资源简介

深入体验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;
using ASPNETAJAXWeb.AjaxLeaveword;

public partial class BoardManage : System.Web.UI.Page
{
protected void Page_Load(object senderEventArgs e)
{
if(!Page.IsPostBack)
{
BindPageData();
}
}

private void BindPageData()
{   ///获取数据
Message message = new Message();
DataSet ds = message.GetMessages();
///显示数据
gvMessage.DataSource = ds;
gvMessage.DataBind();
}
protected void gvMessage_PageIndexChanging(object senderGridViewPageEventArgs e)
{   ///设置新页面,并重新绑定数据
gvMessage.PageIndex = e.NewPageIndex;
BindPageData();
}
protected void gvMessage_RowDataBound(object senderGridViewRowEventArgs e)
{
Button button = (Button)e.Row.FindControl(“btnDelete“);
if(button != null)
{
button.Attributes.Add(“onclick““return confirm(\“您确认要删除当前行的留言吗?\“);“);
}
}
protected void gvMessage_RowCommand(object senderGridViewCommandEventArgs e)
{
if(e.CommandName.ToLower() == “del“)
{   ///删除选择的留言
Message message = new Message();
if(message.DeleteMessage(Int32.Parse(e.CommandArgument.ToString())) > 0)
{   ///重新绑定数据
BindPageData();
}
}
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-10-07 15:56  源码\
     目录           0  2016-10-07 15:56  源码\1\
     目录           0  2016-10-07 15:56  源码\1\database\
     文件     3145728  2011-04-19 16:44  源码\1\database\AjaxLeavewordDB.mdf
     文件     1048576  2011-04-19 16:44  源码\1\database\AjaxLeavewordDB_log.ldf
     目录           0  2016-10-07 15:56  源码\1\Liuyan\
     目录           0  2016-10-07 15:56  源码\1\Liuyan\_UpgradeReport_Files\
     文件        3348  2011-04-19 16:44  源码\1\Liuyan\_UpgradeReport_Files\UpgradeReport.css
     文件       12505  2011-04-19 16:44  源码\1\Liuyan\_UpgradeReport_Files\UpgradeReport.xslt
     文件          69  2011-04-19 16:44  源码\1\Liuyan\_UpgradeReport_Files\UpgradeReport_Minus.gif
     文件          71  2011-04-19 16:44  源码\1\Liuyan\_UpgradeReport_Files\UpgradeReport_Plus.gif
     文件        8704  2011-04-19 16:44  源码\1\Liuyan\AjaxLeaveword.suo
     文件          92  2011-04-19 16:44  源码\1\Liuyan\AjaxService.asmx
     目录           0  2016-10-07 15:56  源码\1\Liuyan\App_Code\
     文件        1420  2011-04-19 16:44  源码\1\Liuyan\App_Code\AjaxService.cs
     文件        1031  2011-04-19 16:44  源码\1\Liuyan\App_Code\ASPNETAJAXWeb.cs
     文件        5158  2011-04-19 16:44  源码\1\Liuyan\App_Code\lei.cs
     目录           0  2016-10-07 15:56  源码\1\Liuyan\App_Data\
     目录           0  2016-10-07 15:56  源码\1\Liuyan\App_Themes\
     目录           0  2016-10-07 15:56  源码\1\Liuyan\App_Themes\css\
     文件        1078  2011-04-19 16:44  源码\1\Liuyan\App_Themes\css\mm.skin
     文件       36352  2011-04-19 16:44  源码\1\Liuyan\App_Themes\css\Thumbs.db
     文件        1188  2011-04-19 16:44  源码\1\Liuyan\App_Themes\css\web.css
     目录           0  2016-10-07 15:56  源码\1\Liuyan\Backup\
     目录           0  2016-10-07 15:56  源码\1\Liuyan\Backup\Liuyan\
     文件        1541  2011-04-19 16:44  源码\1\Liuyan\Backup\Liuyan.sln
     文件       13824  2011-04-19 16:44  源码\1\Liuyan\Backup\Liuyan.suo
     文件          92  2011-04-19 16:44  源码\1\Liuyan\Backup\Liuyan\AjaxService.asmx
     目录           0  2016-10-07 15:56  源码\1\Liuyan\Backup\Liuyan\App_Code\
     文件        1420  2011-04-19 16:44  源码\1\Liuyan\Backup\Liuyan\App_Code\AjaxService.cs
     文件        1031  2011-04-19 16:44  源码\1\Liuyan\Backup\Liuyan\App_Code\ASPNETAJAXWeb.cs
............此处省略1979个文件信息

评论

共有 条评论