Home>
public partial class form3:form
{
  //Cache class
  system.web.caching.cache cache;
  public form3 ()
  {
   initializecomponent ();
   string sql="select top 1000 * from infomation";
   datatable datatable=dbhelper.getdatatable (sql, conntype.menu);
   datagridview1.datasource=datatable;
   cache=system.web.httpruntime.cache;
   cache.insert ("infomation", datatable);
  }
  private void button1_click (object sender, eventargs e)
  {
   if (cache!=null) {
    datatable table=cache ["infomation"] as datatable;
    datagridview2.datasource=table;
   }
  }
}
c
  • Previous PHP verification code implementation code (3 types)
  • Next Aspnet collection of methods to generate verification code (1)