Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Radiobuttonlist client side event...

Posted on 2004-09-16
5
Medium Priority
?
539 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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

971 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