473,851 Members | 2,025 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 1824
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
1417
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
3843
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
3889
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
1193
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
2982
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
13783
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
1901
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
2260
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
1254
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
9897
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9747
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10670
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...
0
9506
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
7073
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
5736
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5933
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4549
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
4143
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.