I have a ASP.NET page with an asp:button that is not visible. I can’t turn it visible with JavaScript because it is not rendered to the page.
What can I do to resolve this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you need to manipulate it on the client side, you can’t use the Visible property on the server side. Instead, set its CSS display style to ‘none’. For example:
Then, you could make it visible on the client side with:
You could make it hidden again with:
Keep in mind that there may be issues with the ClientID being more complex than ‘Label1’ in practice. You’ll need to use the ClientID with getElementById, not the server side ID, if they differ.