Wondering if there is a way upon clicking on a hyper link to set drop downlist to visible in code behind or asp?
<asp:HyperLink ID="HyperLink2" runat="server">View More Workout Programs »</asp:HyperLink>
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 have to do it in code-behind, then use a
LinkButtoninstead of aHyperLink. Then it will have a click event just like any button and in that click event you can set the other element to.Visible=true.However, does this need to be done in code-behind? Keep in mind the difference in “visibility” between server-side and client-side code:
.Visible=falseon the server-side, the content is not delivered to the client at all.display:noneon the client-side, the content is present and can be viewed in the page source, it’s just not displayed by the browser.In some cases, the former is needed for security purposes. But if it’s just a matter of user experience then I would recommend showing/hiding the content entirely on the client-side so as to avoid post-backs that do nothing more than change element display properties.
For example (assuming jQuery):