I'm learning ASP.NET Web Forms and I'm wondering if it's possible to prevent self closing tags when the html code is generated. For instance, if I create an input element, it will self close. How can I prevent this?
Here is the code I'm referring to:
<asp:TextBox id="txt1" runat="server"></asp:TextBox>
Thank you!
Edit: I recently installed Visual Studio 2013 Ultimate and this is what I found:
- Tools > Options > Text Editor > HTML > Advanced > XHTML coding style
- change from True to False
And then:
- Tools > Options > Text Editor > HTML (Web Forms) > Formatting > Tag Specific Options > Default Settings > Client tag does not support contents > Closing tag
- change from Self-closing tag to No closing tag
However, <asp:TextBox runat="server"></asp:TextBox> still gives me <input type="text" /> in the compiled HTML5 code. The result I want is <input type="text">.
So if anyone knows how to accomplish this, I would appreciate it. Thanks!