ASP.NET实现局部刷新GridView
<% @ Page Language = " C# " %>
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
< script runat ="server" >
System.Data.DataView CreateDataSourceByXianhuiMeng()
{
System.Data.DataTable dt = new System.Data.DataTable();
System.Data.DataRow dr;
dt.Columns.Add( new System.Data.DataColumn( " id " , typeof (System.Int32)));
dt.Columns.Add( new System.Data.DataColumn( " 学生姓名 " , typeof (System.String)));
dt.Columns.Add( new System.Data.DataColumn( " 语文 " , typeof (System.Decimal)));
dt.Columns.Add( new System.Data.DataColumn( " 数学 " , typeof (System.Decimal)));
dt.Columns.Add( new System.Data.DataColumn( " 英语 " , typeof (System.Decimal)));
dt.Columns.Add( new System.Data.DataColumn( " 计算机 " , typeof (System.Decimal)));
for ( int i = 1 ; i < 30 ; i ++ )
{
System.Random rd = new System.Random(Environment.TickCount * i); ;
dr = dt.NewRow();
dr[ 0 ] = i;
dr[ 1 ] = " 【孟子E章】 " + i.ToString();
dr[ 2 ] = System.Math.Round(rd.NextDouble() * 100 , 2 );
dr[ 3 ] = System.Math.Round(rd.NextDouble() * 100 , 2 );
dr[ 4 ] = System.Math.Round(rd.NextDouble() * 100 , 2 );
dr[ 5 ] = System.Math.Round(rd.NextDouble() * 100 , 2 );
dt.Rows.Add(dr);
}
System.Data.DataView dv = new System.Data.DataView(dt);
&n
相关文档:
asp.net跳转页面的三种方法比较
今天老师讲了三种跳转页面的方法,现在总结如下:
1. response.redirect 这个跳转页面的方法跳转的速度不快,因为它要走2个来回(2次postback),但他可以跳 转到任何页面,没有站点页面限制(即可以由雅虎跳到新浪),同时不能跳过登录保护。但速度慢是其最大缺陷!r ......
Boolean fileOK = false;
String path = "D:\\";
//string path = "1.gif";
String fileExtension =
&nbs ......
FormExtensions类
FormExtensions类是一个静态类,定义了3种类型的扩展方法:BeginForm、BeginRouteForm、EndForm;在实际开发中,也可以使用using语句,而不需要写EndForm扩展方法。
InputExtensions类
InputExtensions类定义了5种类型的扩展方法:CheckBox,Hidden,Password,RadioButton,TextBox.
<field ......
原帖地址:http://www.wangchao.net.cn/bbsdetail_572426.html
简介
有许多聪明的办法可以解决HTTP协议的无状态问题,例如对每个请求重复发送应用程序数据包、使用HTTP认证机制来将请求映射到特定的用户、使用Cookie来存储一系列请求的状态等。在ASP.net技术中提供了 ......
Asp.net支持三种类型的cache
想写一个技术快速概述,可能写得太多了。技术概略的目的是以最快最简单的方式描述出技术要点,也是我希望的最有效率的知识传播方式。
1. 页面/控件cache
2. 应用程序级cache
3. 浏览器客户端cache
从实现方式来看,页面/控件cache和应用程序级cache都是存放在服务器内存里面的,随着内 ......