HighTechTalks DotNet Forums  

Control with no closing tag

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


Discuss Control with no closing tag in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Peter Zolja
 
Posts: n/a

Default Control with no closing tag - 01-19-2007 , 08:42 AM






Hi,

I'm trying to build a custom control that doesn't have a closing tag. For
example, right now when I create a control from the IDE I get this:

<cc1:MyControl runat="server" ID="SomeId"></cc1:MyControl>

I'd like it to be:

<cc1:MyControl runat="server" ID="SomeId" />

This control won't have any content, so I'm trying to make the definition
shorter. I know it can be done because ImageButton does this; the question
is how?

Thanks.



Reply With Quote
  #2  
Old   
Nathaniel Greene
 
Posts: n/a

Default RE: Control with no closing tag - 01-20-2007 , 12:31 AM






I think I had seen that adding [ParseChildren(false)] at the top of my class
(for C#) <ParseChildren(false)> iirc for vb gave this behavior.
Sadly I can seem to no longer drag and drop user controls from libraries
since SP1 for visual 2005.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiparsechildrenattributeclasstopic.a sp

"Peter Zolja" wrote:

Quote:
Hi,

I'm trying to build a custom control that doesn't have a closing tag. For
example, right now when I create a control from the IDE I get this:

cc1:MyControl runat="server" ID="SomeId"></cc1:MyControl

I'd like it to be:

cc1:MyControl runat="server" ID="SomeId" /

This control won't have any content, so I'm trying to make the definition
shorter. I know it can be done because ImageButton does this; the question
is how?

Thanks.




Reply With Quote
  #3  
Old   
Peter Zolja
 
Posts: n/a

Default Re: Control with no closing tag - 01-22-2007 , 02:50 PM



Quote:
I think I had seen that adding [ParseChildren(false)] at the top of my
class
(for C#) <ParseChildren(false)> iirc for vb gave this behavior.
Sadly I can seem to no longer drag and drop user controls from libraries
since SP1 for visual 2005.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiparsechildrenattributeclasstopic.a sp
That was one of the things I tried before posting, but it doesn't seem to
work. We had some issues with VS too; what we did was to slipstream the SP1
into the kit and reinstall the whole thing. Surprisingly (or maybe not) it
took less to do the slipstream, uninstall, and then reinstall the new
version than simply installing SP1 on top. I hope you get it working...




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.