addarticle.aspx.cs
来自「Asynchrounous pages with Ajax to refresh」· CS 代码 · 共 22 行
CS
22 行
using System;
using System.Data;
using System.Web.UI;
public partial class AddArticle : Page
{
protected void Add_Click(object sender, EventArgs e)
{
// Retrieve the cached DataTable.
DataTable dt = (DataTable)Cache["Headlines"];
// Add a row for the posted title.
dt.Rows.Add(new object[] {DateTime.Now, ArticleTitle.Text});
// In real use, save the added data to a database
// or other underlying data store here.
// Re-cache the updated DataTable.
Cache["Headlines"] = dt;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?