更改更新时的复选框 [英] Checkbox on change update

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

问题描述

嗨我需要帮助解决这个问题,但请不要嘲笑我的问题,我是这个.net编程的新手


有人可以告诉我怎么样让这件事工作:


Private Sub checkbox1_CheckedChanged(ByVal sender As System.Object,ByVal e As System.EventArgs)处理checkbox1check.CheckedChanged

DropDownList1.Enabled = Not DropDownList1.Enable

End Sub


当我浏览页面并更改checkbox1上的检查条件时,dropdownlist1仍在工作


在我的想法中,如果我更改checkbox1条件,dropdownlist1将被禁用。但是在网页上这个下拉列表仍在工作


请给我一个如何使这项工作的方法。 thx

hi i need help on this problem, but please don''t laugh at my question, i''m a newbie on this .net programing

can some one tell how to make this thing work :

Private Sub checkbox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles checkbox1check.CheckedChanged
DropDownList1.Enabled = Not DropDownList1.Enable
End Sub

when i brows the pages and i change the check condition on the checkbox1, the dropdownlist1 still working

in my thinking if i change the checkbox1 condition, the dropdownlist1 will be disabled. but in the web pages this dropdownlist still working

please give me a way how to make this work. thx

推荐答案

DropDownList1.Enabled = Not DropDownList1.Enable


这应该只是:

DropDownList1.Enabled = False


希望这会有所帮助。如果没有,我想我没有正确理解这个问题!
DropDownList1.Enabled = Not DropDownList1.Enable

this should just be:
DropDownList1.Enabled = False

Hope this helps. If not, I guess I didn''t understand the question correctly!



DropDownList1.Enabled = Not DropDownList1.Enable


这应该是:

DropDownList1.Enabled = False


希望这会有所帮助。如果没有,我想我没有正确理解这个问题!
DropDownList1.Enabled = Not DropDownList1.Enable

this should just be:
DropDownList1.Enabled = False

Hope this helps. If not, I guess I didn''t understand the question correctly!



是的我理解脚本,我认为如果我的dropdownlist.enabled属性的初始条件是true(不是true),我的脚本是一回事; = false)。

真正的问题出现在脚本上,但是为什么浏览器中的项目在dropdownlist.enabled属性的更改后没有改变(web显示没有刷新当前条件)?

yes i understand that script, i think my script is the same thing if the initial condition of my dropdownlist.enabled properties is "true"(not "true" = false).
the real problem is on the script, but why is that my project in the browser is not changing following the change on the dropdownlist.enabled properties (the web display is not refreshed on the current condition)?


抱歉,您需要将复选框的PostBack属性更改为true,这样当他们选中该复选框时,它会刷新页面中的任何新属性在程序中设置。
sorry, you need to change the PostBack property of the check box to be true, this way when they check the box, it refreshes the page with whatever new properties you set in your program.


这篇关于更改更新时的复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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