• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 546
  • Last Modified:

Radiobuttonlist client side event...

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
Weller0123
Asked:
Weller0123
  • 2
  • 2
1 Solution
 
AerosSagaCommented:
how bout:

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

Regards,

Aeros
0
 
AerosSagaCommented:
oops scratch that how bout:

rblProj.Item(0).Attributes.Add("onclick", "activate('S');")
0
 
raterusCommented:
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
 
Weller0123Author Commented:
raterus, You're right....

I'm going to use radiobuttons...

Thx...
0
 
raterusCommented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now