473,324 Members | 2,541 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,324 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 1381

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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.