Changing a control to another type - can it be done??

B

Bob H

Hi,

I've a LinkButton in a Repeater. I'd like to 'change' this to a label
depending upon the value in the item (which I've got through the ItemCreated
event). Can this been done at all (I'm working in vb)?

something like
ItemCreated event
- get eventarg
- if data from eventarg = 'A' then display in linkbutton
else
change linkbutton to label and display text

At the moment, I've a clunky method of having a label and Linkbutton side by
side and making the Linkbutton.visible = false depending upon the data.

Many thanks for any advice

Bob
 
F

Felbrigg

A simple way to do this is to have two controls, one a link and one a lable,
then make the one you dont want invisible.
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top