HighTechTalks DotNet Forums  

Embeded Server Controls in a Custom Templated Control

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss Embeded Server Controls in a Custom Templated Control in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
James Hawes
 
Posts: n/a

Default Embeded Server Controls in a Custom Templated Control - 09-28-2004 , 06:06 PM






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



Reply With Quote
  #2  
Old   
James Hawes
 
Posts: n/a

Default Re: Embeded Server Controls in a Custom Templated Control - 09-29-2004 , 11:08 AM






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

"James Hawes" <jbhawes (AT) msn (DOT) com> wrote

Quote:
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




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.