Solved

Radiobuttonlist client side event...

Posted on 2004-09-16
5
525 Views
Last Modified: 2008-01-16
I'm trying to run the function activate() on the onclick event in my code behind.

Any glaring syntax errors here?

rblProj.Items(0).Attributes.Add("onclick", "activate('S');")

Thanks,
0
Comment
Question by:Weller0123
  • 2
  • 2
5 Comments
 
LVL 17

Expert Comment

by:AerosSaga
ID: 12077404
how bout:

rblProj.Attributes.Add("onclick", "activate('S');")

Regards,

Aeros
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 12077437
oops scratch that how bout:

rblProj.Item(0).Attributes.Add("onclick", "activate('S');")
0
 
LVL 33

Accepted Solution

by:
raterus earned 500 total points
ID: 12077639
I think you'll find that you can't do what you are after.  Try it and see, I bet that onClick stuff doesn't ever get rendered on the client.  I messed with this not too long ago and both the radiobuttonlist and the checkboxlist don't allow you to allow additional properties to the rendered listitems.  After much fuss, I ended up using a repeater.
--Michael
0
 

Author Comment

by:Weller0123
ID: 12077739
raterus, You're right....

I'm going to use radiobuttons...

Thx...
0
 
LVL 33

Expert Comment

by:raterus
ID: 12078314
Those work great too, I don't know why MS decided not to allow you to render additional attributes to these controls.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now