473,395 Members | 2,446 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,395 software developers and data experts.

Can I add attributes to a radio button?

Hello
I would like some client side events to fire when controls are edited.
Right now I have:

For Each ctl In myForm.Controls

Select Case ctl.GetType().ToString

Case "System.Web.UI.WebControls.TextBox"

CType(ctl, TextBox).Attributes.Add("OnChange", "DirtyPage()")

Case "System.Web.UI.WebControls.RadioButton"

CType(ctl, RadioButton).Attributes.Add("OnChange", "DirtyPage()")

Case "System.Web.UI.WebControls.DropDownList"

CType(ctl, DropDownList).Attributes.Add("OnChange", "DirtyPage()")

End Select

Next ctl

This will add the attribute to the text box and drop downs, but not the
Radio buttons. I tried replacing "RadioButton" with "RadioButtonList" but
that didn't work.

Thanks!
Nov 18 '05 #1
0 1383

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

Similar topics

10
by: andreister | last post by:
He there! I've discovered that the ================================================= document.links('link_id_here').href = "something"; ================================================= is...
0
by: cthu | last post by:
Hello I would like some client side events to fire when controls are edited. Right now I have: For Each ctl In myForm.Controls Select Case ctl.GetType().ToString Case...
3
by: Janaka | last post by:
I've seen and used some samples where you can set the onclick attrubute to a Button control to get it to do some javascript a la : btnUse.Attributes = "DoSomeJS()"; However when i try and get...
1
by: dhnriverside | last post by:
Hi I'm trying to create some JS to enable/disable some form elements when a radio button grp is set to a certain option. However, the Attributes.Add method does nothing... html.. ...
4
by: tshad | last post by:
Is there a to change just one radio button in a list just after DataBinding but before send the page to the user? For example: RFPServiceTypes.DataSource =...
0
by: djarmoluk | last post by:
I have a RadioButtonList (named rbAnswers) control within a repeater control. When binding to the repeater, I am trying to add an "OnChange" attribute to the individual list item controls (input...
0
by: raz | last post by:
I am writing this because I have not seen an solutions to this problem. The code below worked for me... radio button list name = rblist rblist.DataSource= some reader; rblist.DataBind(); ...
10
by: IchBin | last post by:
I am trying to set the state of a radio button. I do not see what I am doing wrong. Sorry, I am new at this.. I need another set of eyes to look at this snip of code. I am trying to set the radio...
8
by: photoboy | last post by:
I have racked by brain long enough on this, so now I need the help of someone who knows what they are doing. Here is what I am trying to achieve: First, I have two radio buttons (both unchecked)...
2
by: anudu | last post by:
Hi, i am developing a system using asp.net(c#) and javascripts. i make a button in my form disabel in page load method. if a radio button in my page is clicked i have to enable that button. i am...
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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...
0
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...

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.