Results 1 to 2 of 2

Thread: How create cascade style sheet file dynamically

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Thumbs up How create cascade style sheet file dynamically

    Hi

    If we want to add css file, go to > add new item in menu and select css file in our .Net application. But i want to create css file dynamically using coding. Is it possible?? If we can create xml file dynamically we use xmlTextwriter. This much
    can possible for css file to create dynamically.I hope for ur's reply.

    Thanks
    Failing to plan is Planning to fail

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How create cascade style sheet file dynamically

    It depends on how you want to use it. You can use System.Io namespace to create files. CSS files are nothing but text files with a .css extension. You can then add a reference to it in your pages.

    However, if you always want to generate the CSS dynamically - that is, not write it to disk as it may always be changing - you'd use an HttpHandler.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width