944,038 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 788
  • ASP.NET RSS
May 28th, 2007
0

help plz

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
usershan is offline Offline
4 posts
since May 2007
May 28th, 2007
0

Re: help plz

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

ASP.NET Syntax (Toggle Plain Text)
  1. type.SelectedValue.ToString() = "Income"

hope that helps 8-|
Reputation Points: 39
Solved Threads: 0
Light Poster
mike.mclennan is offline Offline
45 posts
since May 2007
May 30th, 2007
0

Re: help plz

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
usershan is offline Offline
4 posts
since May 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Login page refreshes and clears fields
Next Thread in ASP.NET Forum Timeline: Timeout error





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC