Hi All,
Using VB.NET, ASP.NET in framework 1.1 on a webform, I have a Button (system.web.ui.webcontrols.button) that when clicked enables and makes visible an HtmlInputFile control called AdFN. Initially, I have the disabled property set to TRUE and it's visibility setting set to Hidden in it's style property. In the HTML of the aspx file, I have this code:
<INPUT id="AdFN" style='VISIBILITY: hidden; WIDTH: 304px; HEIGHT: 22px' disabled type='file' size='31' name='AdFN' RunAt='Server'> In the onClick handler of the Button in the code behind page, I use: The AdFN becomes enabled and visible. This works fine. My question is how to make it Hidden again in a cleanup routine I have in another webcontrol button called Cancel. I've tried: Neithor throws an exception. However, neithor makes the control hidden. Can someone tell me the magic statement to use in my onClick handler of the Cancel button to make it hidden again? I know about the tricks of masking or covering it with an object but it seems that if I can make it visible using AdFN.Style.Item I should also be able to make it hidden in a similar fashion. Thanks in advance. Stewart
AdFN.Disabled = False
AdFN.Style.Item("Visibility") = Visible
AdFN.Style.Item("Hidden") = True