adding controls dynamically at runtime

M

Mark Siffer

I am trying to add a compare validator at runtime. I would add it before
but my input controls are built at runtime via an editable datagrid.
Therefore, the names of the controls are not known until the page has been
rendered. Any ideas?

Thanks in advance
MS
 
A

avnrao

set CompareValidator1.ControlToCompare and
CompareValidator1.ControlToValidate after creating your controls.

Av.
 
M

Mark Siffer

The problem I am running into is that if you don't set those properties you
can't have the ruant=server property set either. And if you leave that off,
then you get a compile error in the code page that tries to reference the
CompareValidator1
 

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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top