CssClass and HTML file field control

Discussion in 'ASP .Net' started by =?Utf-8?B?bXN1aw==?=, Nov 25, 2004.

  1. All,

    I have a ASP.NET/C# webform which contains a Webform button that has a
    CssClass applied to give it a special effect. Now the same webform has a
    filefield control but the browse button is the default. I would like to
    apply the same CssClass style to the browse button is this possible and how?

    Thanks
    Msuk
    =?Utf-8?B?bXN1aw==?=, Nov 25, 2004
    #1
    1. Advertising

  2. It sounds like you are using a file field. You use the class attribute with
    the name of the CssClass style.

    Not sure if all styles will apply to it:

    <input class="btnclass" type="file">

    "msuk" <> wrote in message
    news:...
    > All,
    >
    > I have a ASP.NET/C# webform which contains a Webform button that has a
    > CssClass applied to give it a special effect. Now the same webform has a
    > filefield control but the browse button is the default. I would like to
    > apply the same CssClass style to the browse button is this possible and
    > how?
    >
    > Thanks
    > Msuk
    >
    Ken Cox [Microsoft MVP], Nov 25, 2004
    #2
    1. Advertising

  3. Hi,

    The style was applied to the text portion of the file field control but not
    the button part. I just want to apply the style to the 'browse' button and
    leave the text portion as the default white.

    Thanks
    Msuk

    "Ken Cox [Microsoft MVP]" wrote:

    > It sounds like you are using a file field. You use the class attribute with
    > the name of the CssClass style.
    >
    > Not sure if all styles will apply to it:
    >
    > <input class="btnclass" type="file">
    >
    > "msuk" <> wrote in message
    > news:...
    > > All,
    > >
    > > I have a ASP.NET/C# webform which contains a Webform button that has a
    > > CssClass applied to give it a special effect. Now the same webform has a
    > > filefield control but the browse button is the default. I would like to
    > > apply the same CssClass style to the browse button is this possible and
    > > how?
    > >
    > > Thanks
    > > Msuk
    > >

    >
    >
    =?Utf-8?B?bXN1aw==?=, Nov 25, 2004
    #3
  4. Hi Musk,
    To add Style to a button check:-
    http://www.datawebcontrols.com/faqs/ButtonColumns/CssClassForButtons.shtml
    Hope it helps.
    Patrick



    "msuk" wrote:

    > Hi,
    >
    > The style was applied to the text portion of the file field control but not
    > the button part. I just want to apply the style to the 'browse' button and
    > leave the text portion as the default white.
    >
    > Thanks
    > Msuk
    >
    > "Ken Cox [Microsoft MVP]" wrote:
    >
    > > It sounds like you are using a file field. You use the class attribute with
    > > the name of the CssClass style.
    > >
    > > Not sure if all styles will apply to it:
    > >
    > > <input class="btnclass" type="file">
    > >
    > > "msuk" <> wrote in message
    > > news:...
    > > > All,
    > > >
    > > > I have a ASP.NET/C# webform which contains a Webform button that has a
    > > > CssClass applied to give it a special effect. Now the same webform has a
    > > > filefield control but the browse button is the default. I would like to
    > > > apply the same CssClass style to the browse button is this possible and
    > > > how?
    > > >
    > > > Thanks
    > > > Msuk
    > > >

    > >
    > >
    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Nov 25, 2004
    #4
  5. Hi,

    Thanks for your response, the file field control is a HTML control not a
    webcontrol and has no CssClass property. So is it still possible to apply a
    CSS to the button on the file field control?

    Thanks
    Msuk

    "Patrick.O.Ige" wrote:

    > Hi Musk,
    > To add Style to a button check:-
    > http://www.datawebcontrols.com/faqs/ButtonColumns/CssClassForButtons.shtml
    > Hope it helps.
    > Patrick
    >
    >
    >
    > "msuk" wrote:
    >
    > > Hi,
    > >
    > > The style was applied to the text portion of the file field control but not
    > > the button part. I just want to apply the style to the 'browse' button and
    > > leave the text portion as the default white.
    > >
    > > Thanks
    > > Msuk
    > >
    > > "Ken Cox [Microsoft MVP]" wrote:
    > >
    > > > It sounds like you are using a file field. You use the class attribute with
    > > > the name of the CssClass style.
    > > >
    > > > Not sure if all styles will apply to it:
    > > >
    > > > <input class="btnclass" type="file">
    > > >
    > > > "msuk" <> wrote in message
    > > > news:...
    > > > > All,
    > > > >
    > > > > I have a ASP.NET/C# webform which contains a Webform button that has a
    > > > > CssClass applied to give it a special effect. Now the same webform has a
    > > > > filefield control but the browse button is the default. I would like to
    > > > > apply the same CssClass style to the browse button is this possible and
    > > > > how?
    > > > >
    > > > > Thanks
    > > > > Msuk
    > > > >
    > > >
    > > >
    =?Utf-8?B?bXN1aw==?=, Nov 29, 2004
    #5
  6. Try adding (ur style directly)
    <input class="btnclass" type="file" style="YourStyles">
    Hope it helps!
    Patrick

    "msuk" wrote:

    > Hi,
    >
    > Thanks for your response, the file field control is a HTML control not a
    > webcontrol and has no CssClass property. So is it still possible to apply a
    > CSS to the button on the file field control?
    >
    > Thanks
    > Msuk
    >
    > "Patrick.O.Ige" wrote:
    >
    > > Hi Musk,
    > > To add Style to a button check:-
    > > http://www.datawebcontrols.com/faqs/ButtonColumns/CssClassForButtons.shtml
    > > Hope it helps.
    > > Patrick
    > >
    > >
    > >
    > > "msuk" wrote:
    > >
    > > > Hi,
    > > >
    > > > The style was applied to the text portion of the file field control but not
    > > > the button part. I just want to apply the style to the 'browse' button and
    > > > leave the text portion as the default white.
    > > >
    > > > Thanks
    > > > Msuk
    > > >
    > > > "Ken Cox [Microsoft MVP]" wrote:
    > > >
    > > > > It sounds like you are using a file field. You use the class attribute with
    > > > > the name of the CssClass style.
    > > > >
    > > > > Not sure if all styles will apply to it:
    > > > >
    > > > > <input class="btnclass" type="file">
    > > > >
    > > > > "msuk" <> wrote in message
    > > > > news:...
    > > > > > All,
    > > > > >
    > > > > > I have a ASP.NET/C# webform which contains a Webform button that has a
    > > > > > CssClass applied to give it a special effect. Now the same webform has a
    > > > > > filefield control but the browse button is the default. I would like to
    > > > > > apply the same CssClass style to the browse button is this possible and
    > > > > > how?
    > > > > >
    > > > > > Thanks
    > > > > > Msuk
    > > > > >
    > > > >
    > > > >
    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Nov 29, 2004
    #6
  7. Hi,

    Thanks for your response but it didnt work :-(

    Thanks
    Msuk

    "Patrick.O.Ige" wrote:

    > Try adding (ur style directly)
    > <input class="btnclass" type="file" style="YourStyles">
    > Hope it helps!
    > Patrick
    >
    > "msuk" wrote:
    >
    > > Hi,
    > >
    > > Thanks for your response, the file field control is a HTML control not a
    > > webcontrol and has no CssClass property. So is it still possible to apply a
    > > CSS to the button on the file field control?
    > >
    > > Thanks
    > > Msuk
    > >
    > > "Patrick.O.Ige" wrote:
    > >
    > > > Hi Musk,
    > > > To add Style to a button check:-
    > > > http://www.datawebcontrols.com/faqs/ButtonColumns/CssClassForButtons.shtml
    > > > Hope it helps.
    > > > Patrick
    > > >
    > > >
    > > >
    > > > "msuk" wrote:
    > > >
    > > > > Hi,
    > > > >
    > > > > The style was applied to the text portion of the file field control but not
    > > > > the button part. I just want to apply the style to the 'browse' button and
    > > > > leave the text portion as the default white.
    > > > >
    > > > > Thanks
    > > > > Msuk
    > > > >
    > > > > "Ken Cox [Microsoft MVP]" wrote:
    > > > >
    > > > > > It sounds like you are using a file field. You use the class attribute with
    > > > > > the name of the CssClass style.
    > > > > >
    > > > > > Not sure if all styles will apply to it:
    > > > > >
    > > > > > <input class="btnclass" type="file">
    > > > > >
    > > > > > "msuk" <> wrote in message
    > > > > > news:...
    > > > > > > All,
    > > > > > >
    > > > > > > I have a ASP.NET/C# webform which contains a Webform button that has a
    > > > > > > CssClass applied to give it a special effect. Now the same webform has a
    > > > > > > filefield control but the browse button is the default. I would like to
    > > > > > > apply the same CssClass style to the browse button is this possible and
    > > > > > > how?
    > > > > > >
    > > > > > > Thanks
    > > > > > > Msuk
    > > > > > >
    > > > > >
    > > > > >
    =?Utf-8?B?bXN1aw==?=, Nov 30, 2004
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ric Pullen
    Replies:
    1
    Views:
    518
    =?Utf-8?B?VGltOjouLg==?=
    Aug 5, 2004
  2. kurt sune

    A question of (web)control and CssClass

    kurt sune, Jan 17, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    392
    Paul Henderson
    Jan 17, 2006
  3. =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=

    get and set an HTML contrls cssClass

    =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=, Jul 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    311
    =?UTF-8?B?R8O2cmFuIEFuZGVyc3Nvbg==?=
    Jul 9, 2006
  4. Sound
    Replies:
    2
    Views:
    439
    Randy Webb
    Sep 28, 2006
  5. jr
    Replies:
    3
    Views:
    417
Loading...

Share This Page