Connecting Tech Pros Worldwide Forums | Help | Site Map

Checkbox on change update

Newbie
 
Join Date: Nov 2006
Posts: 8
#1: Nov 29 '06
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

bplacker's Avatar
Member
 
Join Date: Sep 2006
Location: Las Cruces, NM
Posts: 121
#2: Nov 29 '06

re: Checkbox on change update


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!
Newbie
 
Join Date: Nov 2006
Posts: 8
#3: Nov 30 '06

re: Checkbox on change update


Quote:

Originally Posted by bplacker

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!

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)?
bplacker's Avatar
Member
 
Join Date: Sep 2006
Location: Las Cruces, NM
Posts: 121
#4: Nov 30 '06

re: Checkbox on change update


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.
Newbie
 
Join Date: Nov 2006
Posts: 8
#5: Dec 1 '06

re: Checkbox on change update


Quote:

Originally Posted by bplacker

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.

bplacker thx, it work when i change the autopostback property.

thx a lot ok.
Newbie
 
Join Date: Nov 2006
Posts: 8
#6: Dec 1 '06

re: Checkbox on change update


hei, i have another question for u guys.

can i change the dropdownlist.enabled property( including to update the "dropdownlist"display on the html page ) of my dropdownlist in asp.net project without reloading the page again and again?
Needs Regular Fix
 
Join Date: Jul 2006
Location: India,Hyderabad
Posts: 367
#7: Dec 2 '06

re: Checkbox on change update


hello

if you want to do any operation on web page (.aspx) page with out re loading

the only option is using script language.if you are familiar with java script its

good else there are many third party tools which uses ajax just try with them


regards

nmsreddi
Newbie
 
Join Date: Nov 2006
Posts: 8
#8: Dec 4 '06

re: Checkbox on change update


Quote:

Originally Posted by nmsreddi

hello

if you want to do any operation on web page (.aspx) page with out re loading

the only option is using script language.if you are familiar with java script its

good else there are many third party tools which uses ajax just try with them


regards

nmsreddi

can you give me example a script that change an display object (enabled/disabled )with a java script on my asp.net project?

nb : sorry i never touch a java development sofware, but i want to learn how.

thanks before
bplacker's Avatar
Member
 
Join Date: Sep 2006
Location: Las Cruces, NM
Posts: 121
#9: Dec 4 '06

re: Checkbox on change update


google is very good for javascript
Newbie
 
Join Date: Dec 2006
Posts: 2
#10: Dec 4 '06

re: Checkbox on change update


DropDownList1.Enabled = Not DropDownList1.Enable

this should just be:
DropDownList1.Enabled = False
Newbie
 
Join Date: Nov 2006
Posts: 8
#11: Dec 5 '06

re: Checkbox on change update


Quote:

Originally Posted by nisha4brigade

DropDownList1.Enabled = Not DropDownList1.Enable

this should just be:
DropDownList1.Enabled = False

i allready try the script and work well, because i want to make the condition change opposite the current condition, not to make it allways false.
Reply