Solved

Radiobuttonlist client side event...

Posted on 2004-09-16
5
533 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: 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

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…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

710 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