setting selecteditem item on databound radiobuttonlist in a repeater

R

Rod Snyder

I'm trying to figure out how to set the selected item of databound
radiolistbutton once they are in a repeater (i.e. I want one item
pre-selected instead of nothing selected). In the html there is a property
for selecteditem but it generates an error saying it can only be set at
runtime. Haven't been able to figure out or find how to do that.

Any help or direction would be appreciated.
Rod
 
G

Guest

radiobuttonlist.selecteditem is a "read only" property--you can't set it. Set
either selectedvalue or selectedindex, which you can do either by databinding
in the html or at ItemDataBound in the code-behind.

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top