Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > How do I create a custom webcontrol that can have xml inside it's tag?

Reply
Thread Tools

How do I create a custom webcontrol that can have xml inside it's tag?

 
 
Allan Ebdrup
Guest
Posts: n/a
 
      01-18-2006
How do I create a custom webcontrol that can have xml inside it's tag?
I mean a control like the repeater control, where I can specify special tags
that define the header body and footer of the control.
I'm thinking of something like:
<uc1:CustomControl ID="Control1" runat="server">
<Header>Some text and perhaps other controls</Header>
<Body>Some more text</Body>
<Footer>Even more text</Footer>
</uc1:CustomControl>

Is there a technical term for this? I haven't been able to find information
about this.

Kind Regards,
Allan Ebdrup


 
Reply With Quote
 
 
 
 
Keith Patrick
Guest
Posts: n/a
 
      01-18-2006
ParseChildrenAttribute(false) should get you started. ASP.Net by default
tries to deserialize child markup to the owning object, but if you disable
child parsing, you can control it yourself.


 
Reply With Quote
 
 
 
 
Allan Ebdrup
Guest
Posts: n/a
 
      01-19-2006
"Keith Patrick" <> wrote in message
news:%...
> ParseChildrenAttribute(false) should get you started. ASP.Net by default
> tries to deserialize child markup to the owning object, but if you disable
> child parsing, you can control it yourself.


Thanks,
I've found that I need to create a custom Control Builder for my control,
since creating a custom control builder runs at compiletime while overriding
..AddSubParsedObject runs at runtime. The samples I've found online aren't
very informative, I haven't found examples that explain how I can create a
Control Builder that finds custom tags inside its tags and handles them like
the repeater control.
Any help on creating custom control builders is appreciated.
I'll keep investigating.

some of the links I've looked at:
http://msdn.microsoft.com/library/de...eroverview.asp

http://msdn.microsoft.com/library/de...rolbuilder.asp

http://samples.gotdotnet.com/quickst...rse2.cs&font=3



 
Reply With Quote
 
Allan Ebdrup
Guest
Posts: n/a
 
      01-19-2006
I've tried to get the sample:
http://samples.gotdotnet.com/quickst...r1.aspx&font=3
to work but it keeps saying that The TemplateControlSamples:Repeater1 tag in
the aspx page cant have content between it's opening and closing tags.
What am I doing wrong?


 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
Custom webcontrol that references another webcontrol Fabricio ASP .Net Building Controls 0 09-21-2005 02:55 AM
WebControl inside of WebControl and attaching events Kasabaarde Sumta ASP .Net Building Controls 0 12-13-2004 09:51 PM
Can a webcontrol (webcontrol.dll) have a configuration file? Luis Ramírez. ASP .Net Building Controls 2 07-06-2004 04:35 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57