473,490 Members | 2,592 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

newbie question on cssclass

Hi,

I have the following on an aspx page:
<asp:RadioButton ID="RadioButton1" runat="server" cssclass="radio"
Text="Radio 1"/>

This render as:
<span class="radio"><input id="RadioButton1" type="radio"
name="RadioButton1" value="RadioButton1" /></span>

in IE. It does not work with our existing csss. The graphic designer is
expecting this instead:
<input id="RadioButton1" type="radio" name="RadioButton1"
value="RadioButton1" class="radio" />

Can anyone suggest how to resole this? I already try <input type="radio"
runat="server">, but it does not support AutoPostBack attribute

TIA

Jun 27 '08 #1
2 1276
In what way does this not work ? You can include a style called radio and
set the properties of the radio button just fine.
Well, it works on IE 7 anyway. What browser are u using ?

"Danny Ni" <dn**@yahoo.comwrote in message
news:eW**************@TK2MSFTNGP05.phx.gbl...
Hi,

I have the following on an aspx page:
<asp:RadioButton ID="RadioButton1" runat="server" cssclass="radio"
Text="Radio 1"/>

This render as:
<span class="radio"><input id="RadioButton1" type="radio"
name="RadioButton1" value="RadioButton1" /></span>

in IE. It does not work with our existing csss. The graphic designer is
expecting this instead:
<input id="RadioButton1" type="radio" name="RadioButton1"
value="RadioButton1" class="radio" />

Can anyone suggest how to resole this? I already try <input type="radio"
runat="server">, but it does not support AutoPostBack attribute

TIA

Jun 27 '08 #2
On May 4, 5:55*pm, "Danny Ni" <d...@yahoo.comwrote:
Hi,

I have *the following on an aspx page:
<asp:RadioButton ID="RadioButton1" runat="server" cssclass="radio"
Text="Radio 1"/>

This render as:
<span class="radio"><input id="RadioButton1" type="radio"
name="RadioButton1" value="RadioButton1" /></span>

in IE. It does not work with our existing csss. The graphic designer is
expecting this instead:
<input id="RadioButton1" type="radio" name="RadioButton1"
value="RadioButton1" class="radio" />

Can anyone suggest how to resole this? I already try <input type="radio"
runat="server">, but it does not support AutoPostBack attribute

TIA
Hi,

If you noticed an ASP.NET RadioButton is translated in TWO HTML
elements, a SPAN and the INPUT. If you want to change the INPUT you
have to do it like:
rButton1.InputAttributes.Add("Class", "MyClass");
Jun 27 '08 #3

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

Similar topics

0
1444
by: Steve Kallal | last post by:
I have a DataGrid with an EditCommandColumn column set to a type of PushButton. I want to set set CssClass on these buttons and cannot without using code-behind code on the ItemDataBound event. The...
6
1991
by: msuk | last post by:
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...
6
2522
by: tshad | last post by:
Are Validators able to use CSSClass? I have the following: <asp:RegularExpressionValidator ControlToValidate="txtEmail" CssClass="errorMessage" Text = "Invalid Email Address!"...
1
2182
by: chrisfox | last post by:
Hi, I try to customize the style of my Webparts with a CSS Stylesheet. Therefore I define a CSS File and define some CSS Classes. Now a problem occurs. Some of the classes have no effect on the...
2
1157
by: prasad | last post by:
see iam having a user control and i want a cssclass for that users control ,no prolem in providing that .but the problem is that it requires two diff styles for the same control so i need two...
2
9527
by: Kevin L. Kitchens | last post by:
Howdy... Been toying the the asp:menu object in order to dump the manually generated menu I've been using, however, I cannot seem to get the coloring to work properly. First off, what CSS...
3
2188
by: shapper | last post by:
Hello, On a class I am defining the CssClass of a control at runtime. However, I would also like to create the CssClass at runtime. Is this possible? Something like: Dim...
2
1347
by: shapper | last post by:
Hello, I created a custom control that inherits CompositeControl: Public Class MySection Inherits CompositeControl ... Protected Overrides Sub CreateChildControls() ......
1
2731
by: Jonathan Wood | last post by:
Greetings, On a GridView control, I want to show alternating colors. But instead of alternating on each row, I want to alternate each group. So several items would be one color and the next...
0
6974
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
7183
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...
1
6852
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...
0
7356
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...
1
4878
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4573
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...
0
3074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
628
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
277
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...

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.