User-709217888 posted
Hi
I'm fairly new to ASP.Net and am trying to write my own Custom Control, of which I need some help....
Basically, I need a control such as....
<MyCS:MyOutput ID="MyOutput1" runat="server" Initial="true">
<MyCS:IntitialTemplate>
--- put some javascript here
</MyCS:IntitialTemplate>
<MyCS:ErrorTemplate>
--- put some javascript here
</MyCS:ErrorTemplate>
</MyCS:MyOutput>
In essence, I need some child attributes which define some javascript that is rendered in the custom control's Render() method depending on the outcome of an operation server-side.
My question is whether this can be done and how would the control be coded server side? So far as the child attributes/properties go, I've tried [ParseChildren(true)] & [PersistChildren(false)] but they don't seem to be doing anything.
Can anyone offer any advice on how to code this?
Thanks
Jon