數據綁定完成後,我將關閉數據綁定事件。 我想捕捉可能發生的任何錯誤,所以我不運行StoredProc「sp_UpdatePrintQueueToPrinted」。如何在DataBound事件之前/之前捕獲錯誤
如何在DataBound事件之前捕獲錯誤?
protected void ListView1_DataBound(object sender, EventArgs e)
{
using (GPEntities gpe = new GPEntities())
{
gpe.sp_UpdatePrintQueueToPrinted();
}
}
我明白了你的觀點。是的,我想抓住DataBind()。 – 2011-06-15 17:09:14