I have a span element in my asp.net page without runat server attribute. I need to set this span’s visibility, but the decision to make it visible has to come from code behind. I don’t want to set runat=”server”
Share
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.
You could try something like this in your code behind, I am using jQuery but no need to really.
Update:
You can read an variable from the server to see if you want to render the span or not while rendering the page. jQuery Code.. ShowMySpan is an public int variable on the server