Results 1 to 5 of 5

Thread: [RESOLVED] adding css file to Class Library Project

  1. #1

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Resolved [RESOLVED] adding css file to Class Library Project

    Hi Guys,

    I have a custom gridview control which is a class library project.

    I want to be able to specify the css class for the gridview which I can do.

    But I also want to set a default css stylesheet to the gridview. So if I don't override it using the cssclass property it must get it's cssclass from the default stylesheet I have in my project.

    How can I specify the default stylesheet. I have a stylesheet in a folder called "Styles" in my project.

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: adding css file to Class Library Project

    Hey,

    Am I not right in saying that you can specify the CssClass property in your code? You could first check to see if the CssClass property of the GridView has a value, i.e. the user has set it in the ASPX markup, and if they haven't assign the default value that you want to use.

    Gary

  3. #3

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Re: adding css file to Class Library Project

    hey gary,

    you are right. but I need to embed the css file as a resource. then reference it. I looked at this example but it is done is VS2005

    http://blogs.msdn.com/b/coding4fun/a...5/2429765.aspx

    he speaks about WebResource. I don't see an AssemplyInfo file in my class library project.

    How can I do that in VS2008. If I add the css file as a resource, how can I then get access to a certain css class in my custom controls code??

  4. #4

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Re: adding css file to Class Library Project


  5. #5
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: adding css file to Class Library Project

    Hey,

    Does that mean that you have got the problem solved?

    If so, remember to mark resolved

    Gary

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