I have this asp.net label. As it is a server control and I want to store some custom information, I have stored it in css style. The idea is browser won’t understand this attribute so it will just ignore whereas if I put it directly as some inbuilt property it will throw compile time error. This is my code:
<asp:Label runat="server" id="sample" style="fakeStyle:someValue" />
How do I get the value of fakeStyle using Jquery?
Don’t do that. Use custom attribute instead:
Then read it like this:
For the record, you can read CSS value with such code:
But like I said, having invalid CSS is not a good idea.