更改HtmlInput控件的按钮部分的样式 [英] Changing the style of the button portion of an HtmlInput control

查看:390
本文介绍了更改HtmlInput控件的按钮部分的样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




有没有办法修改HtmlInput

控件按钮部分的样式?我有一个CSS类,我用它来测试所有按钮

使它们比标准灰色更难看但是,如果我将它应用于

an HtmlInput控件,所有这一切都改变了文本框部分中的背景和前景

颜色。


同样,如果我修改了style属性,那只适用到文本框

部分。


有没有办法改变

HtmlInput控件的按钮部分的外观?


感谢您的任何帮助。


Best,


Mark Rae

Hi,

Is there any way to modify the style of the button portion of an HtmlInput
control? I have a CSS class which I use for all of the buttons to try to
make them a little less ugly than the standard grey but, if I apply this to
an HtmlInput control, all that does is change the background and foreground
colours in the textbox portion.

Similarly, if I modify the style attribute, that only applies to the textbox
portion too.

Is there any way to change the appearance of the button portion of an
HtmlInput control?

Any assistance gratefully received.

Best,

Mark Rae

推荐答案

马克我通过使用带有样式表的按钮来完成这个技巧:




..buttonStyle {FONT-WEIGHT:bold; FONT-SIZE:7pt; TEXT-TRANSFORM:

capitalize;白颜色; FONT-FAMILY:Verdana; BACKGROUND-COLOR:

#7da1e9}


< asp:ButtonColumn Text =" Hello"按钮类型= QUOT; PushButton的" />


在ItemCreated上我设置了CSClass: -


Dim myButton As Button = CType(e.Item.Cells( 0).Controls(0),Button)

myButton.CssClass =" buttonStyle"


希望它有所帮助

Patrick


***通过开发人员指南 http:// www。 developersdex.com ***

不要只参加USENET ......获得奖励!
Mark i do this trick by using Button like

with a style sheet:-

..buttonStyle { FONT-WEIGHT: bold; FONT-SIZE: 7pt; TEXT-TRANSFORM:
capitalize; COLOR: white; FONT-FAMILY: Verdana; BACKGROUND-COLOR:
#7da1e9 }

<asp:ButtonColumn Text="Hello" ButtonType="PushButton" />

And on ItemCreated i set the CSClass by :-

Dim myButton As Button = CType(e.Item.Cells(0).Controls(0), Button)
myButton.CssClass = "buttonStyle"

Hope it helps
Patrick

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!


" ; Patrick Olurotimi Ige < ig*@iprimus.com.au>在消息中写道

新闻:%2 *************** @ tk2msftngp13.phx.gbl ...
"Patrick Olurotimi Ige" <ig*@iprimus.com.au> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
带样式表: -

buttonStyle {FONT-WEIGHT:bold; FONT-SIZE:7pt; TEXT-TRANSFORM:
大写;白颜色; FONT-FAMILY:Verdana; BACKGROUND-COLOR:
#7da1e9}

< asp:ButtonColumn Text =" Hello"按钮类型= QUOT; PushButton的" />

在ItemCreated上我设置了CSClass: -

Dim myButton As Button = CType(e.Item.Cells(0).Controls(0),按钮)
myButton.CssClass =" buttonStyle"
with a style sheet:-

buttonStyle { FONT-WEIGHT: bold; FONT-SIZE: 7pt; TEXT-TRANSFORM:
capitalize; COLOR: white; FONT-FAMILY: Verdana; BACKGROUND-COLOR:
#7da1e9 }

<asp:ButtonColumn Text="Hello" ButtonType="PushButton" />

And on ItemCreated i set the CSClass by :-

Dim myButton As Button = CType(e.Item.Cells(0).Controls(0), Button)
myButton.CssClass = "buttonStyle"




Patrick,


......?



Patrick,

Unless I''m much mistaken, this code is to change the style of a ButtonColumn
in a DataGrid...?


有没有人对此有任何想法。 ..?


" Mark Rae" <毫安** @ mark-N-O-S-P-A-M-rae.co.uk>在留言中写道

新闻:哦************** @ TK2MSFTNGP09.phx.gbl ...
Does anyone have any thoughts on this...?

"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:Oh**************@TK2MSFTNGP09.phx.gbl...

有没有办法修改HtmlInput
控件的按钮部分的样式?我有一个CSS类,我用它来测试所有按钮,使它们比标准灰色更难看,但是,如果我将这个
应用到HtmlInput控件,所有这一切都是改变文本框部分中的背景和前景色。

同样,如果我修改了style属性,那也只适用于
文本框部分。
HtmlInput控件的按钮部分的外观?

感激不尽的任何帮助。

最好,

Mark Rae
Hi,

Is there any way to modify the style of the button portion of an HtmlInput
control? I have a CSS class which I use for all of the buttons to try to
make them a little less ugly than the standard grey but, if I apply this
to an HtmlInput control, all that does is change the background and
foreground colours in the textbox portion.

Similarly, if I modify the style attribute, that only applies to the
textbox portion too.

Is there any way to change the appearance of the button portion of an
HtmlInput control?

Any assistance gratefully received.

Best,

Mark Rae



这篇关于更改HtmlInput控件的按钮部分的样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆