在数据库中存储复选框并与其创建链接 [英] storing check box in database and create link with it

查看:73
本文介绍了在数据库中存储复选框并与其创建链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这里,我想在数据库中保存复选框的值,然后如果选中复选框,那么我想获得一个链接转到特定用户的详细信息视图中的另一个页面。如果未选中该复选框该链接不会出现在特定行的详细信息视图中...

(c#)

here, i want to save the value of check box in database,then if the check box was checked then i want to get a link to go to another page in details view of particular user.And if the check box was unchecked the link will not appear in the the details view of a particular row...
(c#)

推荐答案

我可以存储复选框值,但我如何在复选框视图中使用复选框创建链接?

您不必创建带复选框的链接。为所有人放置链接,但只根据相关的复选框值隐藏一些链接。因此,链接控件的可见属性将根据复选框驱动。



您可以直接在设计人员使用 Eval 方法或使用 RowDataBound 获取复选框值并设置链接控制的可见性。试试。
i can store the checkbox value but how i can create the link in the details view with the checkbox?
You don''t have to create links with checkbox. Place links for all but just hide few based on the related checkbox value. Thus, Visible property of the link control will be driven based on checkbox.

You can do it directly in designer using Eval method OR use RowDataBound to get checkbox value and set visiblity of link control. Try out.


使用sql数据适配器从数据库中获取值并使用值使复选框可见
using sql data adapter to get value from database and with the value make the checkbox visible


这篇关于在数据库中存储复选框并与其创建链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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