Professional Web Applications Themes

Read a CSS File - ASP.NET Building Controls

Using vb.net. Can anyone provide some insight or examples of reading a css file. I want to be able to read the name/value pairs for some classes. My asp.net app is using IE WebControls TabStrips which don't support css from a file. That makes is a chore to change all the tab styles when needed. I finally figured out how to set the tab styles via code, so that does simplify it some. It would be even better if I could read the styles from a css file so I don't need to change code to change the tab styles. ...

  1. #1

    Default Read a CSS File

    Using vb.net.
    Can anyone provide some insight or examples of reading a css file.
    I want to be able to read the name/value pairs for some classes.
    My asp.net app is using IE WebControls TabStrips which don't support css
    from a file. That makes is a chore to change all the tab styles when needed.
    I finally figured out how to set the tab styles via code, so that does
    simplify it some. It would be even better if I could read the styles from a
    css file so I don't need to change code to change the tab styles.

    TIA

    --

    Alphonse Giambrone
    Email: a-giam at customdatasolutions dot us



    Alphonse Giambrone Guest

  2. #2

    Default Re: Read a CSS File

    Hi Alphonse,

    In ASP.NET there is no built-in support for parsing CSS files, so you will
    need to write your own pr.
    >>> My asp.net app is using IE WebControls TabStrips which don't support css
    >>> from a file.
    Mmm... what exactly do you mean by this? I'm not much familiar with the
    TabStrip control but I'm guessing it derives directly or indirectly from
    System.Web.UI.WebControls.WebControl which has a CssClass property where you
    can specify the css class to use. Isn't this useful to you?

    --
    Victor Garcia Aprea
    Microsoft MVP | ASP.NET
    Looking for insights on ASP.NET? Read my blog:
    [url]http://obies.com/vga/blog.aspx[/url]


    "Alphonse Giambrone" <NOSPAMa-giamexample.invalid> wrote in message
    news:e3GpLGxWEHA.4020TK2MSFTNGP09.phx.gbl...
    > Using vb.net.
    > Can anyone provide some insight or examples of reading a css file.
    > I want to be able to read the name/value pairs for some classes.
    > My asp.net app is using IE WebControls TabStrips which don't support css
    > from a file. That makes is a chore to change all the tab styles when
    needed.
    > I finally figured out how to set the tab styles via code, so that does
    > simplify it some. It would be even better if I could read the styles from
    a
    > css file so I don't need to change code to change the tab styles.
    >
    > TIA
    >
    > --
    >
    > Alphonse Giambrone
    > Email: a-giam at customdatasolutions dot us
    >
    >
    >

    Victor Garcia Aprea [MVP] Guest

  3. #3

    Default Re: Read a CSS File

    Thanks for the response Victor.
    Yes, the tabstrip has a css property, but I don't know what it affects and
    can't find any docs on it.
    What I need to set are the various tab and separator styles which can be set
    in the html using standard style syntax.
    Each is an attribute (TabDefaultStyle, TabSelectedStyle, TabHoverStyle,
    SepDefaultStyle) and are of type Microsoft.Web.UI.WebControls.CssCollection.

    [url]http://msdn.microsoft.com/library/default.asp?url=/workshop/webcontrols/overview/tabstrip.asp[/url]

    To set via code one must build the attribute with the usual
    collection.Add(key,value) syntax.
    I have tried various arrangements in a css file, but nothing I tried worked.
    Some of my trials include:

    mytabstyle.TabDefaultStyle
    {
    background-image:url(../images/myimage.gif);
    }

    TabDefaultStyle mytabstyle
    {
    background-image:url(../images/myimage.gif);
    }
    ..mytabstyle TabDefaultStyle
    {
    background-image:url(../images/myimage.gif);
    }

    It would be easier to extract the styles from an xml file, but by using a
    css file, I can use the stylebuilder.

    If you have any other suggestions, I am open.

    --

    Alphonse Giambrone
    Email: a-giam at customdatasolutions dot us


    "Victor Garcia Aprea [MVP]" <vgaNOobiesSPAM.com> wrote in message
    news:ubJSiYxWEHA.1152TK2MSFTNGP09.phx.gbl...
    > Hi Alphonse,
    >
    > In ASP.NET there is no built-in support for parsing CSS files, so you will
    > need to write your own pr.
    >
    > >>> My asp.net app is using IE WebControls TabStrips which don't support
    css
    > >>> from a file.
    > Mmm... what exactly do you mean by this? I'm not much familiar with the
    > TabStrip control but I'm guessing it derives directly or indirectly from
    > System.Web.UI.WebControls.WebControl which has a CssClass property where
    you
    > can specify the css class to use. Isn't this useful to you?
    >
    > --
    > Victor Garcia Aprea
    > Microsoft MVP | ASP.NET
    > Looking for insights on ASP.NET? Read my blog:
    > [url]http://obies.com/vga/blog.aspx[/url]
    >
    >
    > "Alphonse Giambrone" <NOSPAMa-giamexample.invalid> wrote in message
    > news:e3GpLGxWEHA.4020TK2MSFTNGP09.phx.gbl...
    > > Using vb.net.
    > > Can anyone provide some insight or examples of reading a css file.
    > > I want to be able to read the name/value pairs for some classes.
    > > My asp.net app is using IE WebControls TabStrips which don't support css
    > > from a file. That makes is a chore to change all the tab styles when
    > needed.
    > > I finally figured out how to set the tab styles via code, so that does
    > > simplify it some. It would be even better if I could read the styles
    from
    > a
    > > css file so I don't need to change code to change the tab styles.
    > >
    > > TIA
    > >
    > > --
    > >
    > > Alphonse Giambrone
    > > Email: a-giam at customdatasolutions dot us
    > >
    > >
    > >
    >
    >

    Alphonse Giambrone Guest

  4. #4

    Default Re: Read a CSS File

    Hi Alphonse,

    As Victor has mentioned that the .net framework hasn't provided buildin
    support for processing css file or the css format data. If we want to
    programmatically p it, we have to define our own class library. In
    addition, here are some cetain resources I've found on the web which may be
    helpful to you:

    #Css pr
    [url]http://www.programmersheaven.com/zone15/cat1232/30461.htm[/url]

    #CSS Custom Provider To extend Web Control's Property Window
    [url]http://www.codeproject.com/aspnet/RaoCSSProvider.asp[/url]

    Thanks.

    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! [url]www.microsoft.com/security[/url]
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    Get Preview at ASP.NET whidbey
    [url]http://msdn.microsoft.com/asp.net/whidbey/default.aspx[/url]


    Steven Cheng[MSFT] Guest

  5. #5

    Default Re: Read a CSS File

    Thanks Steven, I already managed to p out the classes I need and apply
    to the tabstrips, but will certainly check out those links for more ideas.

    --

    Alphonse Giambrone
    Email: a-giam at customdatasolutions dot us


    "Steven Cheng[MSFT]" <v-schangonline.microsoft.com> wrote in message
    news:y4e4tpOXEHA.328cpmsftngxa10.phx.gbl...
    > Hi Alphonse,
    >
    > As Victor has mentioned that the .net framework hasn't provided buildin
    > support for processing css file or the css format data. If we want to
    > programmatically p it, we have to define our own class library. In
    > addition, here are some cetain resources I've found on the web which may
    be
    > helpful to you:
    >
    > #Css pr
    > [url]http://www.programmersheaven.com/zone15/cat1232/30461.htm[/url]
    >
    > #CSS Custom Provider To extend Web Control's Property Window
    > [url]http://www.codeproject.com/aspnet/RaoCSSProvider.asp[/url]
    >
    > Thanks.
    >
    > Regards,
    >
    > Steven Cheng
    > Microsoft Online Support
    >
    > Get Secure! [url]www.microsoft.com/security[/url]
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
    > Get Preview at ASP.NET whidbey
    > [url]http://msdn.microsoft.com/asp.net/whidbey/default.aspx[/url]
    >
    >

    Alphonse Giambrone Guest

Similar Threads

  1. Read a DB File
    By Danilo Giuliani in forum MySQL
    Replies: 1
    Last Post: July 18th, 04:40 PM
  2. How to read an IFO file ?
    By Bou@h in forum PERL Modules
    Replies: 0
    Last Post: February 25th, 08:12 PM
  3. File system get auto change from read-write to read-oly
    By RC in forum Linux / Unix Administration
    Replies: 1
    Last Post: October 23rd, 10:51 PM
  4. Read Only File, NEED HELP >>>>>>>
    By adnan mahmood in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 1
    Last Post: August 1st, 03:18 PM
  5. read txt file
    By Rowan Ferguson in forum Macromedia Director Lingo
    Replies: 1
    Last Post: July 28th, 06:14 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139