ASP.NET control closing tags

Just a general curiousity.  Can anyone explain the point behind the closing tags in ASP.NET development?  It just seems kind of verbose when you can use the text property to show any text that needs to be displayed?  Always wondered about this one.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David RobitailleAnalyst ProgrammerCommented:
That whole closing tag thing is all about being XHTML/XML "compilant"
I usually use this syntax when i dont have anything to put between the tags and i always use the text property.
<asp:textbox ID="textbox1" runat="server" test="text"/>
I use a closing tag only what is necessary, like when i do a dropdownlist with fixed items.
stretch73Author Commented:
I write my stuff the same way, but whenever I download demo code it seems like it's always written with the closing tag.  I figured there was some practical reason that I just hadn't heard of but I've never seen it addressed before.
David RobitailleAnalyst ProgrammerCommented:
well, i made a quick search because it was botherring myself for a wile too. i dident find anything
Maybe if you format a label like this the text proprety is not cached in the viewstate?
<asp:Label ID="Label1" runat="server" >label</asp:Label>
But, it may just be it`s just laziness from the demo`s author. Visual web developer format controls that way whenever you drag one in the page. They may have think it s easier to remove the closing tag that add it...
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Remember that ASP tags are just like HTML tags whats the point of doing a <br></br> if you can do a <br />.
It's just how the standard is.

You can have a
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
And a
<asp:TextBox ID="TextBox1" runat="server" />

It's just how the standard works. and there's no sense in altering this since asp tags just get preprocessed server side and afterwards translated into html tags anyway.
David RobitailleAnalyst ProgrammerCommented:
i think stretch73 was mor wondering about the
<asp:Label ID="Label1" runat="server" >label</asp:Label>
<asp:Label ID="Label1" runat="server" text="label" />
but i agree, it<s just how the standard work...
stretch73Author Commented:
I was just wondering because back in the classic ASP days, I was taught to use as few opening and closing <% tags as possible because it basically meant another round trip to the server.  Seems to me that a closed tag like <asp:label text='label' runat='server' />  makes more sense.  It couldn't make that much difference or I'm sure they'd specify which was better.  Thanks for the input.
David RobitailleAnalyst ProgrammerCommented:
I confirm you that it dont make much difference. it just make code easier to read

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.