噓 VZA:看不懂你的問題點! 08/04 20:44
※ 引述《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