commenting aspx code

V

Vipper

Hi,

This question seems a little silly, but I want to dissable code lines using
this way:

<asp:Button ID="Button1" runat="server" Text="Button" /></div>
<!--<asp:Button ID="Button1" runat="server" Text="ButtonOld"
/></div>-->

But I get an error about a duplicate identificator.
How can I fix it?
 
R

Riki

Vipper said:
Hi,

This question seems a little silly, but I want to dissable code lines
using this way:

<asp:Button ID="Button1" runat="server" Text="Button" /></div>
<!--<asp:Button ID="Button1" runat="server" Text="ButtonOld"
/></div>-->

But I get an error about a duplicate identificator.
How can I fix it?

Use <%-- --%> tags for commenting out control tags.
 
T

ThunderMusic

hi,
actually, there are two problems in your code:
First, put a space between <!-- and <asp:Button and the same applies for the
end tag ( -->)
Second, you've included a </div> that did not start in your comment block

I hope it helps

ThunderMusic
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top