I don\'t know how to apply CSS for a HTML generic control like
and given
runat=\"server\"
in ASP.NET. I am finding
Please try this,
ull.Style.Add("background-color", "Red");
Or, I have tested this, will definitely work, please check
ull.Attributes.Add("class", "yourClass");
Edit: To test this solution I have provided you:
make new blank master page and put <ul runat="server" id="ull">
then add a new page and use the above master page.
make findcontrol ul and put in CSS as I have mentioned in the answer.
then run your page, and view source of your HTML page and you will find what you are looking for. Like