作者a2975313 (GN)
看板C_Sharp
标题Re: [问题] ASP.NET如何侦错?
时间Sun Aug 3 23:59:30 2008
※ 引述《a2975313 (GN)》之铭言:
: 想请问客位
: 我写了一个程式,主要是使用Repeater,我分成2个档案 一个是xxx.aspx
: 另一个是xxx.aspx.cs
: 想问xxx.aspx.cs档要如何侦错?
xxx.aspx.cs档里面的程式是↓
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Init(object sender, EventArgs e)
{
rp.ItemCommand += new RepeaterCommandEventHandler(rp_ItemCommand);
}
void rp_ItemCommand(object source, RepeaterCommandEventArgs e)
{
if (e.CommandName.Equals("delCmd"))
{
foreach (RepeaterItem item in rp.Items)
{
//如果CheckBox 有勾选,进入抓取系统编号,然後删掉此笔资料
if (((CheckBox)item.FindControl("cb")).Checked)
{
int 系统编号 = Int32.Parse(((HiddenField)item.FindControl("hfd_系统编号")).Value);
//删除资料的动作.
}
}
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
}
这要如何侦错~"~
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 125.229.34.12
1F:嘘 VZA:看不懂你的问题点! 08/04 20:44