I use asp.net and C# 4.
I would like to know if is possible and how to retrieve a “Normal” (not asp.net) element in Code Behind.
For instance: I have a <li></li>, I would like get it from my logic and set is Visible to False.
At the moment I tried to change the MarkUp with:
<li ID="li-item" runat="server">
// Does not work I get Error: ID no identified....
I’m pretty new to Asp.Net, please give me a sample of code. Thanks for your support.
PS: I hope to do not get down votes because it is a too trivial question 🙂
"li-item"is not a valid identifier. And you need to close thelitag.Try:
(I have used an underscore instead of
-)Now it should work