可见属性不起作用

编程入门 行业动态 更新时间:2024-10-21 19:48:25
本文介绍了可见属性不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

protected void CheckBox1_CheckedChanged(object sender, EventArgs e) { ImageButton edit = (ImageButton)PreviousPage.FindControl("lnkEdit"); ImageButton delete = (ImageButton)PreviousPage.FindControl("lnkDelete"); CheckBox chkTest = (CheckBox)sender; GridViewRow grdRow = (GridViewRow)chkTest.NamingContainer; if (chkTest.Checked) { edit.Visible = true; delete.Visible = true; } else { edit.Visible = false; delete.Visible = false; } }

嗨这是我的代码,当我没有检查chekboxes时,我的图像按钮也可见

hi this is my code when i am not checking the chekboxes the also my image buttons are visible

推荐答案

如果这是检查中发生的所有处理都发生了变化,您可以在客户端进行。通过将display设置为none。 If this is all the processing that happens on the check changed, you could do it on the client side. By setting display to none.

Hi 首先,您可以在设计时或页面加载事件中将linkedit和linkdelete属性更改为flase u可以从两个链接按钮中设置属性为假。 问候 Aravind Hi first u can change linkedit and linkdelete property visible to flase in design time or in page load event u can set property from both link button visible as false. Regards Aravind

更多推荐

可见属性不起作用

本文发布于:2023-11-11 18:13:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1579199.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不起作用   属性

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!