re-rendering custon control from its own code.

G

Gerry Cook

Is there any way to trigger a re-rendering of a custom control from inside
the control itself. what I want to do is be able to generate different
child control configuarations from input into the custom control. For
example if a user selects a different configuation of the child controls on
the custom control.
 
V

Victor Garcia Aprea [MVP]

Hi Gerry,

Are you writing a composite custom control? From your description it looks
like you're after the CreateChildControls method...

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx

To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
 
G

Gerry Cook

Thanks, Victor. I just discovered a property that automatically refreshes
the custom control: Me.ChildControlsCreated = False It appears as though it
will be what I need though I haven't finished testing it yet.
 
V

Victor Garcia Aprea [MVP]

Yup, setting that property to false will cause your CreateChildControls
logic to be executed next time the fx needs to create your child controls.

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx

To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
 

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
474,085
Messages
2,570,597
Members
47,219
Latest member
Geraldine7

Latest Threads

Top