I have a ddl that controls the visibility of a textbox (using panels). For example if i select 'Other' from the text box, a post back occurs and a text box appears beneath it for you to give further details. If any other value (for example 'dry') is selected it's an accepted value and nothing else happens. Only problem is that if i select other, add details the text box and then go back and change the value to 'dry' (for example) the text box may dissapear but the value is still held within the box.
So what i'm looking to do is when i select a given value to re-hide my text box, i also need to clear the contents of the text box at the same time. This is how my VB code looks so far:
Protected Sub ddlWeather_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlWeather.SelectedIndexChanged
If ddlWeather.SelectedValue = ("Other") Then
PanelWeather.Visible = True
PanelWeather.Visible = False
I've tried using 'clearvalue' and 'selectedindex = 0' but they're not applicable for text boxes. Is there any other way that i can null the text box?
View Complete Post