Override design time databind settings of label WebControl at runtime ?

M

Martin

Hi,

I've got a web label control which I set a databind expression on the Text
attribute in the html for the page (aspx file).

At runtime, I want to override this attribute, so before I do
MyLabel.databind() (or actually Page.DataBind()), I set Text to "".
This doesn't work because then the databind comes along and redefines the
Text attribute.

Then I tried removing this control from the Page before doing my
Page.DataBind(). However it still does the databind!!!!!!!!!!!!!!
Can I only dynamically remove controls that I've added dynamically?

Why else is this failing?

Given that I want the default databinding defined in the html for my page,
how should I stop the databinding in non-default situations?
I have loads of controls on the page, so don't want to databind each one (or
not) individually.

TIA
Martin
 

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,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top