Embeded Server Controls in a Custom Templated Control

J

James Hawes

I have created a templated control. As far as the control is concerned I am
able to put any HTML inside each template. However, I can't seem to figure
out how to embed a server control to it. When I compile and run it shows
up, but I can't wire up any kind of event to it. I have searched all over
the place for help. Could someone please point me in the right direction?

I'd be glad to post some code, but this control is copy-righted by the
company I work for, so I'll need to tweak it a little. I've also tried
touse the find control functions. This does find the control without
issue, however, I get a NullReference value exception when I try to add an
event to it, or even simply try to change the text. Essentially I want to
be able to add a button to one of my templates and then wire that button up.

Thanks,

James
 
J

James Hawes

I always try my best to respond when I find an answer. My issue was that
this control was initially an HTML control. I was overriding the Render
function. Once I commented out Render it worked fine.
I now have a seperate issue where I am creating some basic events to be
triggered. As a result of removing the Render I am unable to maintain
state.

James
 

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,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top