I am trying to change the CSS for a span tag using C #, but I cannot do this. I tried giving it an HTMLGenericControl type, but cannot get the CssClass tag for the popup in IntelliSense.
span
HTMLGenericControl
CssClass
<span id="collegeSpan" runat="server" class="college">other code here</span>
You tried:
collegeSpan.Attributes["class"] = "foo";
If you can modify HTML / ASCX, use asp:Label instead of span . The asp:Label element appears as span on the page, but it has several advantages, including the ability to change the CssClass property.
asp:Label
Source: https://habr.com/ru/post/1346128/More articles:Call a program from a Powershell list with a very long list of variable arguments? - powershellCan we pass the entered username to the URL of the authentication error in spring security? - javaRemoving strings from a C # array - arraysInvalid argument type for unary expression - objective-chow to change bitmapmesh pattern to include fisheye effect? - androidAutologout iphone app - objective-cRemoving items from iPython history - pythonConfigure DBAL through Symfony2 to return lowercase keys - phpCorrect way to install driverOptions to configure DBAL Doctrine in symfony2 - phpJavascript: how much more efficient is forked function declaration? - performanceAll Articles