Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Is it possble to set VS.Net to make this tag:

 

<asp:TextBox id="TextBox1" runat="server"></asp:TextBox>

 

appear by default like this?

 

<asp:TextBox id="TextBox1" runat="server" />

 

or is there a danger in this? I am new to ASP.Net

 

Dan

  • Moderators
Posted

Actually, by default it should have a closing tag. (As in your first example.)

 

[edit]Sorry, I miss-read your question, It is ok to use the second method, but I don't know how to set it as default within the designer.

Visit...Bassic Software
Posted

I'm not sure how to set it as default, but there's no real difference in the two. It's just that the 1st option there allows you to put text between the opening and closing tag to display within the TextBox, while the other would require using the Text property.

 

As with almost everything else in ASP.NET, there's a bunch of different options to do various things, and the reason is mostly to let those coming from HTML/ASP migrate easier into the .NET world.

Gamer extraordinaire. Programmer wannabe.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...