下一页中的Gridview复选框值 [英] Gridview Checkbox value in next page

查看:69
本文介绍了下一页中的Gridview复选框值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用会话将gridview中的值一旦选中gridview的复选框发送到下一页?请帮助。

这是我的查询



主页:

How to send values in loop once selected checkbox of gridview to next page using session? Help please.
Here''s my query

main page:

Dim checked As String

For Each Row As Gridview1 In gridview.Rows
   Dim chk As CheckBox = Row.FindControl("chk")
   If chk.Checked = True Then
      Session("next")=checked.row.cells(0)
      response.redirect(session("next")

Another page
lable1.text = session("next")

推荐答案

将它们存储在会话中,并从那里读取它们。如果您不知道会话是如何工作的,那么阅读文章 [ ^ ]而不是盲目地复制和粘贴您不理解的代码。
You store them in the session, and read them from there. If you have no clue how the session works, it''s important enough for you to read an article[^] instead of blindly copying and pasting code you don''t understand.


这篇关于下一页中的Gridview复选框值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆