[英]I get no errors when adding a row to a DataTable, but the row is not added to the database
[英]After adding a row in to the repeater, when I refresh page, again that row is being repeated in datatable
當我刷新頁面時,再次在數據表中重復該行..該如何解決呢?
DataTable dt1 = new DataTable();
da1.Fill(dt1);
DataView dv = new DataView(dt1);
rptMatrixs.DataSource = dv;
rptMatrixs.DataBind();
嘗試將代碼包裝在其中:
if (!IsPostBack)
{
// code here
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.