Template user control

J

Jeff

Hi,

I've created a template user control and followed the example on the
MSDN (the message template with fruit as the example).

However, my template needs to be an input control, similar to login;
in that the developer can specify a template or use the default
layout. I've got it working however, if I create my template in the
Page_Init, as in the example, when I do a post back the value of the
control as entered by the user is lost. When I move the template
creation to Page_Load everything seems to be ok.

I've used reflector to look at the login control to see how it works,
and although its not a user control it is the sort of thing I'm trying
to do.

I'm using OnBubbleEvent to detect the post vack and raise my own event
with appropriate eventargs. My only concern is that I can't use
Page_Init (or CreateChildControls) as in the MS code example. Anyone
else have experience of this?

TIA.
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top