Dynamically Creating A CSS Class

N

Nathan Sokalski

I have a control that creates a CSS class which I want to put on the page.
Other people have told me that the best way to do this is using the
RegisterClientScriptBlock method, even though it is not a script. I have
done it using this method, but I am now writing my first control as a custom
control (one that is a *.vb file rather than a *.ascx file). My control
works fine, except the CSS from the RegisterClientScriptBlock is not showing
up in the browser. I think that the line of code with the
RegisterClientScriptBlock is getting called too late to show up in the
output (I call it during the Render method). Where would be the best place
to call this from? Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top