473,748 Members | 6,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1817
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:ButtonColu mn Text="Hello" ButtonType="Pus hButton" />

And on ItemCreated i set the CSClass by :-

Dim myButton As Button = CType(e.Item.Ce lls(0).Controls (0), Button)
myButton.CssCla ss = "buttonStyl e"

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.co m.au> wrote in message
news:%2******** *******@tk2msft ngp13.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:ButtonColu mn Text="Hello" ButtonType="Pus hButton" />

And on ItemCreated i set the CSClass by :-

Dim myButton As Button = CType(e.Item.Ce lls(0).Controls (0), Button)
myButton.CssCla ss = "buttonStyl e"


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******** ******@TK2MSFTN GP09.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******** ******@TK2MSFTN GP15.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******** ******@TK2MSFTN GP09.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******** ******@TK2MSFTN GP14.phx.gbl...
"Tampa.NET Koder" <an*******@micr osoft.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.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******** ******@TK2MSFTN GP15.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******** ******@TK2MSFTN GP09.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*******@micr osoft.com> wrote in message
news:Ox******** ******@TK2MSFTN GP12.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*******@micr osoft.com> wrote in message
news:Ox******* *******@TK2MSFT NGP12.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@psychedelic jones.com> wrote in message
news:vh******** *************** *********@4ax.c om...
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@psychedelic jones.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

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

Similar topics

0
1415
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 using the checkbox object. These are all created on-the-fly using the following code: While dtrSelect.Read Dim DocumentRow As New TableRow Dim DocumentCell As New TableCell Dim DocumentCell1 As New TableCell Dim chkDocument As CheckBox
2
3840
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 container. In this case, I don't want the default hand cursor to be displayed so that the user things that it is a hyperlink when it's not. I just want the default cursor to display as with any other image when the user passes the mouse over it. Any way...
1
3888
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. Is there a javascript function that will open a file browser window? This way I could fully customize appearance. Thanks, Charlie
2
1190
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 want to change the background colour of a button to the default background colour for controls, it may or may not be grey (depending on the preferences, eg Windows Classic style vs. Windows XP style or a customised style may have changed the...
7
2972
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 already formatted as "Shopping" ---Bold "for" -----Regular Now I want to underline whole text by preserving old style i.e. Bold and
6
13777
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 || WS_CLIPSIBLINGS || WS_TABSTOP || BS_FLAT). What should I do now? All help will be appreciated. rca.
1
1897
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 control to false when the control loses focus so that when the user moves to the next field in the form the calendar disappears. Is there anyway to do this in ASP.NET or ASP.NET w/ Javascript?
6
2253
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" type="text/javascript"> <!-- function css_style(css_choice) { document.getElementById("css_style").innerHTML="css_styles/style"+css_choice+".css";
0
1249
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 information.
0
9374
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9325
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9249
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.