您的位置:首页 > 其它

新学习到的GridView使用方法

2008-08-21 10:35 183 查看
最近新做了一个评论系统,在制作的过程中又学会了几点GridView控件的使用方法,为了以后不忘记还是记录下来吧!

还是用实际例子来描述,根据读者的留言内容来进行评判(支持/反对)。

protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)

2 {

3{

10{

13{

20{

34{

36{

43 string sql = "update reply set fandui=fandui+1 where id=" + id;

44 UpDateNoP(sql);

45 BindData();

46 HttpCookie fandui = new HttpCookie("fandui" + id.ToString(), "yes");

47 fandui.Expires = DateTime.Now.AddSeconds(300);//有效期为300秒

48 Response.Cookies.Add(fandui);//写入Cookie

49 Label2.Visible = false;

50 }

51 }

52 }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐