help plz

Reply

Join Date: May 2007
Posts: 4
Reputation: usershan is an unknown quantity at this point 
Solved Threads: 0
usershan usershan is offline Offline
Newbie Poster

help plz

 
0
  #1
May 28th, 2007
Hi all ,
I want to disable a text box when i select a value from drop down list, but im not able to so can u please help me

This is my code:

Protected Sub type_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles type.SelectedIndexChanged
If type.SelectedItem.Value = "Income" Then
vc.Enabled = False
Else
vc.Enabled = True
End If
End Sub
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 45
Reputation: mike.mclennan is an unknown quantity at this point 
Solved Threads: 0
mike.mclennan's Avatar
mike.mclennan mike.mclennan is offline Offline
Light Poster

Re: help plz

 
0
  #2
May 28th, 2007
There could be a few problems. the best idea is to use the debugger to see what value the if statement is actually comparing. use F9 to create a break point and then just move through the code. The debugger is the most powerful tool available to any programmer.

but you also might want to try

  1. type.SelectedValue.ToString() = "Income"

hope that helps 8-|
- mike mclennan
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 4
Reputation: usershan is an unknown quantity at this point 
Solved Threads: 0
usershan usershan is offline Offline
Newbie Poster

Re: help plz

 
0
  #3
May 30th, 2007
Hello Sir
Thanks for ur reply, Sir this also i have tried to do but not able to, the problem is i have a text box and dropdown box with 2 values income and expenses, when i select income value then then voucher number text box should be disabled and if i select expenses then voucher number text box should be enabled. Kindly help me.

Thanku in advance
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP.NET Forum


Views: 680 | Replies: 2
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC