473,388 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Changing the style of the button portion of an HtmlInput control

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
Nov 19 '05 #1
11 1789
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!
Nov 19 '05 #2
"Patrick Olurotimi Ige" <ig*@iprimus.com.au> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
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,

Unless I'm much mistaken, this code is to change the style of a ButtonColumn
in a DataGrid...?
Nov 19 '05 #3
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...
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

Nov 19 '05 #4
Man, your question is throwing me in circles. You keep going back and
forth. The HTMLInputText does not have a button, its just a plain old
textbox. Are you referring tot he HTML File upload control?? I suggest
you post a url where you page is hosted or something.
"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:OM**************@TK2MSFTNGP15.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...
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


Nov 19 '05 #5
For that control, I think the same style for the button and the textbox
would have to be the same. I don't think you can split the style between
the two by default. You can always inherit from controls and style them the
way you want, even though this is a pain in the a$$ sometimes.
"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:Oe**************@TK2MSFTNGP14.phx.gbl...
"Tampa.NET Koder" <an*******@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...

Sorry, I'm referring to HtmlInputFile... :-(

"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:OM**************@TK2MSFTNGP15.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...
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



Nov 19 '05 #6
"Tampa.NET Koder" <an*******@microsoft.com> wrote in message
news:Ox**************@TK2MSFTNGP12.phx.gbl...
For that control, I think the same style for the button and the textbox
would have to be the same.


No matter what I try, any styles I set are applied to the textbox portion
only - seems it's impossible to modify the style of the button portion.
Nov 19 '05 #7
pj
On Mon, 7 Mar 2005 19:39:44 -0000, "Mark Rae"
<ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote:
"Tampa.NET Koder" <an*******@microsoft.com> wrote in message
news:Ox**************@TK2MSFTNGP12.phx.gbl...
For that control, I think the same style for the button and the textbox
would have to be the same.


No matter what I try, any styles I set are applied to the textbox portion
only - seems it's impossible to modify the style of the button portion.


Forget ASP.NET for a minute. Just create a simple HTML webform with a
file input control on it, and try to change the style on the button.
It's pretty much impossible to do it.

pj
--
http://www.psychedelicjones.com/
Nov 19 '05 #8
"pj" <pj@psychedelicjones.com> wrote in message
news:vh********************************@4ax.com...
Forget ASP.NET for a minute. Just create a simple HTML webform with a
file input control on it, and try to change the style on the button.
It's pretty much impossible to do it.


Yes indeed - anybody know how...?
Nov 19 '05 #9
pj
On Mon, 7 Mar 2005 20:56:41 -0000, "Mark Rae"
<ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote:
"pj" <pj@psychedelicjones.com> wrote in message
news:vh********************************@4ax.com.. .
Forget ASP.NET for a minute. Just create a simple HTML webform with a
file input control on it, and try to change the style on the button.
It's pretty much impossible to do it.


Yes indeed - anybody know how...?


No, nobody does :-). I just put the "pretty much" in to CMA. I think
what you're trying to do is in fact impossible.

pj

--
http://www.psychedelicjones.com/
Nov 19 '05 #10
Mark sorry i posted another style..
But u can also apply a similar style to input button.
<input type="button" style="PUT UR STYLE HERE"/>
Hope it helps
Patrick
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #11
"Patrick Olurotimi Ige" <ig*@iprimus.com.au> wrote in message
news:ek**************@TK2MSFTNGP09.phx.gbl...
But u can also apply a similar style to input button.
<input type="button" style="PUT UR STYLE HERE"/>
Hope it helps


How does this apply to an HtmlInputFile control...?
Nov 19 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Scott P. | last post by:
I'm creating an app using ASP .NET (my second app so bear with me here) that basically builds a PDF file based on a bunch of user selections. I have a page which displays a series of checkboxs...
2
by: David Hearn | last post by:
I have an ImageButton control that I am using on one of my pages. Sometimes, this button will act as a button and redirect users to another page. But sometimes, it will just act as an image...
1
by: Charlie | last post by:
Using the HTML file upload control gives you input textbox and a command button. How do you change appearance and caption of button? Setting style attributes doesn't appear to work completely. ...
2
by: Colin McGuire | last post by:
Hi, according to the on-line documentation you can change the background colour of, for example a button, to Gray as shown below. Dim b as Button b.BackColor=Color.Gray If I programmatically...
7
by: Sakharam Phapale | last post by:
Hi All, How to preserve the old font properties while changing new one? I posted same question 2 months back, but I had very small time then. eg. "Shopping for" is a text in RichTextBox and...
6
by: rongchaua | last post by:
Hi all, I want to change the style of a button. But I don't know how to do it. For example, I have already a button OK on form. I want to add these styles to this button (WS_CHILD || WS_VISIBLE ||...
1
by: jjwhite01 | last post by:
I am working on a web form that contains a Calendar control with an image button that makes the calendar appear and disappear. However, I would like to set the visible property of the Calendar...
6
exoskeleton
by: exoskeleton | last post by:
hi dear experts...i dont know if im in the right forum but...if not please kindly move this thread.. my problem is that how to change value like this one: <script language="JavaScript"...
0
by: jobs | last post by:
Any way to change the style of a button inside a Login Control? Any way to assign a skin id to the control, that impacts a control (like button) inside the control? thanks for any help or...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.