danomatic Posted April 3, 2003 Posted April 3, 2003 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 Quote
Moderators Robby Posted April 3, 2003 Moderators Posted April 3, 2003 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. Quote Visit...Bassic Software
wyrd Posted April 3, 2003 Posted April 3, 2003 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. Quote Gamer extraordinaire. Programmer wannabe.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.