Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Dynamically Creating A CSS Class

Reply
Thread Tools

Dynamically Creating A CSS Class

 
 
Nathan Sokalski
Guest
Posts: n/a
 
      06-26-2006
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.
--
Nathan Sokalski
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.nathansokalski.com/


 
Reply With Quote
 
 
 
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      06-26-2006
Nathan,

I am not so sure, I thought that this one was performing earlier, although
on the MSDN page is written that it goes in the same time. Maybe you can try
it yourself.

http://msdn.microsoft.com/library/de...criptTopic.asp

I hope this helps,

Cor


"Nathan Sokalski" <(E-Mail Removed)> schreef in bericht
news:%(E-Mail Removed)...
>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.
> --
> Nathan Sokalski
> (E-Mail Removed)
> http://www.nathansokalski.com/
>



 
Reply With Quote
 
 
 
 
Vadivel Kumar
Guest
Posts: n/a
 
      06-26-2006
May be you can override OnPreRender and do this stuff.

-
Vadivel Kumar
http://vadivelk.net
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically creating <style type="text/css"> Amil Hanish ASP .Net 1 08-01-2006 01:37 AM
Dynamically Creating A CSS Class Nathan Sokalski ASP .Net 2 06-26-2006 07:29 AM
Dynamically Creating A CSS Class Nathan Sokalski ASP .Net Building Controls 2 06-26-2006 07:29 AM
Nested Class, Member Class, Inner Class, Local Class, Anonymous Class E11 Java 1 10-12-2005 03:34 PM
Dynamically creating CSS Nathan Sokalski ASP .Net 1 10-08-2005 04:58 AM



Advertisments